Fallback to HTTPConnection if BufferedHTTPConnection is nbot available

This commit is contained in:
gholt 2010-11-18 13:40:40 -08:00
parent 39502d6695
commit abfa4f91eb
2 changed files with 10 additions and 4 deletions

7
bin/st
View File

@ -41,8 +41,11 @@ try:
except: except:
from time import sleep from time import sleep
from swift.common.bufferedhttp \ try:
import BufferedHTTPConnection as HTTPConnection from swift.common.bufferedhttp \
import BufferedHTTPConnection as HTTPConnection
except:
from httplib import HTTPConnection
def quote(value, safe='/'): def quote(value, safe='/'):

View File

@ -29,8 +29,11 @@ try:
except: except:
from time import sleep from time import sleep
from swift.common.bufferedhttp \ try:
import BufferedHTTPConnection as HTTPConnection from swift.common.bufferedhttp \
import BufferedHTTPConnection as HTTPConnection
except:
from httplib import HTTPConnection
def quote(value, safe='/'): def quote(value, safe='/'):