Skip to content
This repository has been archived by the owner on Sep 23, 2020. It is now read-only.

Commit

Permalink
Catch socket errors when importing a key
Browse files Browse the repository at this point in the history
This includes "[Errno 111] Connection refused" when a cloud is down
(e.g. for maintenance).
  • Loading branch information
priteau committed Feb 28, 2013
1 parent b3e3700 commit db1626e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions sandbox/FG/test_add_user.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@ def add_one_user(dtrs_client, access_key, access_secret, pub_key, username):
except socket.timeout:
print "Error: timeout when registering key %s on %s" % (phantomkey_name, host)
pass
except socket.error:
print "Error: socket error when registering key %s on %s" % (phantomkey_name, host)
pass

def main():

Expand Down

0 comments on commit db1626e

Please sign in to comment.