Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
sakia
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
clients
python
sakia
Commits
97244b46
Commit
97244b46
authored
9 years ago
by
inso
Browse files
Options
Downloads
Patches
Plain Diff
Fix wrong exception in bma_access
parent
755986ed
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/cutecoin/core/net/api/bma/access.py
+5
-3
5 additions, 3 deletions
src/cutecoin/core/net/api/bma/access.py
with
5 additions
and
3 deletions
src/cutecoin/core/net/api/bma/access.py
+
5
−
3
View file @
97244b46
...
...
@@ -169,12 +169,13 @@ class BmaAccess(QObject):
tries
+=
1
except
ClientError
:
tries
+=
1
except
TimeoutError
:
except
asyncio
.
TimeoutError
:
tries
+=
1
if
len
(
nodes
)
==
0
or
json_data
is
None
:
raise
NoPeerAvailable
(
""
,
len
(
nodes
))
return
json_data
@asyncio.coroutine
def
simple_request
(
self
,
request
,
req_args
=
{},
get_args
=
{}):
"""
Start a request to the network but don
'
t cache its result.
...
...
@@ -199,11 +200,12 @@ class BmaAccess(QObject):
tries
+=
1
except
ClientError
:
tries
+=
1
except
TimeoutError
:
except
asyncio
.
TimeoutError
:
tries
+=
1
else
:
raise
NoPeerAvailable
(
""
,
len
(
nodes
))
@asyncio.coroutine
def
broadcast
(
self
,
request
,
req_args
=
{},
post_args
=
{}):
"""
Broadcast data to a network.
...
...
@@ -233,7 +235,7 @@ class BmaAccess(QObject):
raise
except
ClientError
:
pass
except
TimeoutError
:
except
asyncio
.
TimeoutError
:
pass
else
:
raise
NoPeerAvailable
(
""
,
len
(
nodes
))
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment