simples3
simples3 copied to clipboard
Don't bail when python lacks ssl support
If your python is compiled without ssl support, simples3 will start to cry:
python2.5 setup.py build -b build-2.5
Traceback (most recent call last):
File "setup.py", line 8, in <module>
import simples3
File "simples3/__init__.py", line 124, in <module>
from .bucket import S3File, S3Bucket, S3Error, KeyNotFound
File "simples3/bucket.py", line 66, in <module>
class StreamHTTPSHandler(urllib2.HTTPSHandler):
AttributeError: 'module' object has no attribute 'HTTPSHandler'
IMO ssl should be optional and not required
It is optional, though it seems like a disservice to the end-user not to force the library user to think about it. I forget how exactly one sets plain HTTP up, but basically you change the service_url.
HTH -L
As discussed on IRC it actually is required, mostly because the module-level names in simples3/bucket.py would need to be wrapped in ifs and things get ugly pretty quick. In fact I don't even know what StreamHTTPS?Handler is for.