diff options
author | Tim Burke <tim.burke@gmail.com> | 2018-05-16 17:33:40 +0000 |
---|---|---|
committer | Tim Burke <tim.burke@gmail.com> | 2018-07-11 13:09:00 -0700 |
commit | da362a653e9c70cb6ae17a7c3764887b4fd3fcf2 (patch) | |
tree | d705e880aff1078d8b1cb7228e629f9003bf655c /swiftclient | |
parent | c2c5af603f8ae25be052a20b02dc109b0f8f014a (diff) | |
download | python-swiftclient-da362a653e9c70cb6ae17a7c3764887b4fd3fcf2.tar.gz |
Back out some version bumps
I'm giving up on trying to back out all of the test-requirements
up-revs, but let's try to stay compatibile with old requests/six.
As part of that, only disable some requests warnings on new-enough requests.
Note that we should now be compatible with distro packages back to
Ubuntu 16.04 and CentOS 6. Our six is still too new for Trusty, but
hey, there's less than a year left on that anyway, right?
Change-Id: Iccb23638393616f9ec3da660dd5e39ea4ea94220
Related-Change: I2a8f465c8b08370517cbec857933b08fca94ca38
Diffstat (limited to 'swiftclient')
-rwxr-xr-x | swiftclient/shell.py | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/swiftclient/shell.py b/swiftclient/shell.py index e91a16f..3f66d5f 100755 --- a/swiftclient/shell.py +++ b/swiftclient/shell.py @@ -1819,9 +1819,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: |