Commits

Anonymous committed f2fca02

Fixed #54 Fix for sha depreciation warning in S3.py
Cleaned up import.

  • Participants
  • Parent commits 5fa8705

Comments (0)

Files changed (1)

 import base64
 import hmac
 import httplib
-import re
-import sha
-import sys
+try:
+    from hashlib import sha1 as sha
+except ImportError:
+    import sha
 import time
 import urllib
 import urlparse
                     = urlparse.urlparse(location)
             if scheme == "http":    is_secure = True
             elif scheme == "https": is_secure = False
-            else: raise invalidURL("Not http/https: " + location)
+            else: raise IOError("Not http/https: " + location)
             if query: path += "?" + query
             # retry with redirect