1
0

do not raise BaseException

This commit is contained in:
SomberNight
2018-04-07 17:10:30 +02:00
parent 76e67daadd
commit 7b50790584
21 changed files with 53 additions and 53 deletions

View File

@@ -923,7 +923,7 @@ class Network(util.DaemonThread):
self.notify('updated')
else:
raise BaseException(interface.mode)
raise Exception(interface.mode)
# If not finished, get the next header
if next_height:
if interface.mode == 'catch_up' and interface.tip > next_height + 50:
@@ -1055,7 +1055,7 @@ class Network(util.DaemonThread):
self.switch_to_interface(i.server)
break
else:
raise BaseException('blockchain not found', index)
raise Exception('blockchain not found', index)
if self.interface:
server = self.interface.server
@@ -1074,7 +1074,7 @@ class Network(util.DaemonThread):
except queue.Empty:
raise util.TimeoutException(_('Server did not answer'))
if r.get('error'):
raise BaseException(r.get('error'))
raise Exception(r.get('error'))
return r.get('result')
def broadcast(self, tx, timeout=30):