summaryrefslogtreecommitdiff
path: root/swiftclient/shell.py
diff options
context:
space:
mode:
authorPradeep Kumar Singh <pradeep.singh@nectechnologies.in>2015-06-23 10:48:50 +0900
committerPradeep Kumar Singh <pradeep.singh@nectechnologies.in>2015-06-23 10:50:34 +0900
commite596489020438c7f3b747fc0efe93c158d45c4a5 (patch)
tree10db686f8f7a5942f3693b7aa1ec9e3ac06a4ab0 /swiftclient/shell.py
parent7c716997a8ede3f98741709b0594340df9849a76 (diff)
downloadpython-swiftclient-e596489020438c7f3b747fc0efe93c158d45c4a5.tar.gz
Added check for negative segment-size
Closes-Bug: #1453135 Change-Id: Ia9c2b27d998e6ac1889cc74c12e456c06ecd84d9
Diffstat (limited to 'swiftclient/shell.py')
-rwxr-xr-xswiftclient/shell.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/swiftclient/shell.py b/swiftclient/shell.py
index 29b3457..4438e9d 100755
--- a/swiftclient/shell.py
+++ b/swiftclient/shell.py
@@ -763,6 +763,9 @@ def st_upload(parser, args, output_manager):
return
options.segment_size = str((1024 ** size_mod) * multiplier)
+ if int(options.segment_size) <= 0:
+ output_manager.error("segment-size should be positive")
+ return
_opts = vars(options)
_opts['object_uu_threads'] = options.object_threads