From abfa4f91eba748c672ea2dfe67546f1ab1d13c34 Mon Sep 17 00:00:00 2001 From: gholt Date: Thu, 18 Nov 2010 13:40:40 -0800 Subject: [PATCH] Fallback to HTTPConnection if BufferedHTTPConnection is nbot available --- bin/st | 7 +++++-- swift/common/client.py | 7 +++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/bin/st b/bin/st index 9632428a8a..6a8b02bb37 100755 --- a/bin/st +++ b/bin/st @@ -41,8 +41,11 @@ try: except: from time import sleep -from swift.common.bufferedhttp \ - import BufferedHTTPConnection as HTTPConnection +try: + from swift.common.bufferedhttp \ + import BufferedHTTPConnection as HTTPConnection +except: + from httplib import HTTPConnection def quote(value, safe='/'): diff --git a/swift/common/client.py b/swift/common/client.py index 7d9e73655f..b89d06aa66 100644 --- a/swift/common/client.py +++ b/swift/common/client.py @@ -29,8 +29,11 @@ try: except: from time import sleep -from swift.common.bufferedhttp \ - import BufferedHTTPConnection as HTTPConnection +try: + from swift.common.bufferedhttp \ + import BufferedHTTPConnection as HTTPConnection +except: + from httplib import HTTPConnection def quote(value, safe='/'):