summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorBen McCann <ben@benmccann.com>2013-07-08 15:32:28 -0700
committerBen McCann <benjamin.j.mccann@gmail.com>2013-07-08 17:09:44 -0700
commit188e835eadeb24ebdb822af3971e792d99d5b622 (patch)
treed7a36dd12a4dab15b7a411c03b596e9af94e2e24 /bin
parent6f7458a2903f6be2bf3271825e837d30b4e9f737 (diff)
downloadpython-swiftclient-188e835eadeb24ebdb822af3971e792d99d5b622.tar.gz
Allow setting # of retries in the binary
Change-Id: I7ef4f1f86cc6ea4937043ea7bf7d9526e23bd2c7
Diffstat (limited to 'bin')
-rwxr-xr-xbin/swift3
1 files changed, 3 insertions, 0 deletions
diff --git a/bin/swift b/bin/swift
index 416b183..0c2c2cb 100755
--- a/bin/swift
+++ b/bin/swift
@@ -46,6 +46,7 @@ def get_conn(options):
return Connection(options.auth,
options.user,
options.key,
+ options.retries,
auth_version=options.auth_version,
os_options=options.os_options,
snet=options.snet,
@@ -1312,6 +1313,8 @@ Examples:
parser.add_option('-K', '--key', dest='key',
default=environ.get('ST_KEY'),
help='Key for obtaining an auth token.')
+ parser.add_option('-R', '--retries', type=int, default=5, dest='retries',
+ help='The number of times to retry a failed connection.')
parser.add_option('--os-username',
metavar='<auth-user-name>',
default=environ.get('OS_USERNAME'),