summaryrefslogtreecommitdiff
path: root/swiftclient
diff options
context:
space:
mode:
authorZuul <zuul@review.openstack.org>2018-07-24 23:12:51 +0000
committerGerrit Code Review <review@openstack.org>2018-07-24 23:12:51 +0000
commitd80f24f2fd3f80994f109cdabe3c778b77c18472 (patch)
tree64a68875c439f1bf8912bb4c529d834e9386001b /swiftclient
parent6872b95560ab77b200fde9e322af30bba99c99eb (diff)
parentda362a653e9c70cb6ae17a7c3764887b4fd3fcf2 (diff)
downloadpython-swiftclient-d80f24f2fd3f80994f109cdabe3c778b77c18472.tar.gz
Merge "Back out some version bumps"
Diffstat (limited to 'swiftclient')
-rwxr-xr-xswiftclient/shell.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/swiftclient/shell.py b/swiftclient/shell.py
index ff5b2be..9ca28b1 100755
--- a/swiftclient/shell.py
+++ b/swiftclient/shell.py
@@ -1942,9 +1942,14 @@ Examples:
parser.usage = globals()['st_%s_help' % args[0]]
if options['insecure']:
import requests
- from requests.packages.urllib3.exceptions import \
- InsecureRequestWarning
- requests.packages.urllib3.disable_warnings(InsecureRequestWarning)
+ try:
+ from requests.packages.urllib3.exceptions import \
+ InsecureRequestWarning
+ except ImportError:
+ pass
+ else:
+ requests.packages.urllib3.disable_warnings(
+ InsecureRequestWarning)
try:
globals()['st_%s' % args[0]](parser, argv[1:], output)
except ClientException as err: