Mention --segment-size option after 413 response

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
This commit is contained in:
Tim Burke 2015-03-05 15:28:42 -08:00
parent 8e94ca6394
commit c9f79e641c

@ -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)