Skip to content

Commit

Permalink
Remove tabs and use "except .. as .."
Browse files Browse the repository at this point in the history
  • Loading branch information
eyj committed Jan 13, 2016
1 parent 7b33500 commit 4423c0d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion beaver/run_queue.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def run_queue(queue, beaver_config, logger=None):
count += 1
logger.debug("Number of transports: " + str(count))
break
except TransportException, e:
except TransportException as e:
failure_count = failure_count + 1
if failure_count > beaver_config.get('max_failure'):
failure_count = beaver_config.get('max_failure')
Expand Down
6 changes: 3 additions & 3 deletions beaver/transports/rabbitmq_transport.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,8 @@ def reconnect(self):
self._logger.debug("RabbitMQ: Reconnecting...")
self.interrupt()

self._thread = Thread(target=self._connection_start)
self._thread.start()
self._thread = Thread(target=self._connection_start)
self._thread.start()
while self._thread.is_alive() and not self._connection_ok:
time.sleep(1)
if self._connection_ok:
Expand All @@ -122,7 +122,7 @@ def _connection_start(self):
)
if not self._connection.is_closed:
self._connection.ioloop.start()
except Exception, e:
except Exception as e:
self._logger.error('RabbitMQ: Failed to connect: %s', e)

def _connect(self):
Expand Down

0 comments on commit 4423c0d

Please sign in to comment.