diff options
author | Tim Burke <tim.burke@gmail.com> | 2015-03-05 15:28:42 -0800 |
---|---|---|
committer | Tim Burke <tim.burke@gmail.com> | 2015-03-05 15:37:18 -0800 |
commit | c9f79e641c6906e95095f3e0e505f9bd3f715bc2 (patch) | |
tree | b469226c0e6fc7f875a985b8fda3073beeeaf146 | |
parent | 8e94ca639417e36ea4dee59930c1308928076e16 (diff) | |
download | python-swiftclient-c9f79e641c6906e95095f3e0e505f9bd3f715bc2.tar.gz |
Mention --segment-size option after 413 response2.4.0
Previously, it would only output something like
ClientException: Object PUT failed <url> 413 Request Entity Too Large
Your request is too large.
... which is misleading as it implies that Swift simply can't handle
large objects.
Change-Id: Icec9e76b2671490c3a2249ec08992950107c6828
-rwxr-xr-x | swiftclient/shell.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/swiftclient/shell.py b/swiftclient/shell.py index e579b8f..c7bb4f8 100755 --- a/swiftclient/shell.py +++ b/swiftclient/shell.py @@ -845,6 +845,12 @@ def st_upload(parser, args, output_manager): ) else: output_manager.error("%s" % error) + too_large = (isinstance(error, ClientException) and + error.http_status == 413) + if too_large and options.verbose > 0: + output_manager.error( + "Consider using the --segment-size option " + "to chunk the object") except SwiftError as e: output_manager.error(e.value) |