Commits

Erik Wickstrom committed 6144c5d

Refactored some if statements into a more pythonic form.

Comments (0)

Files changed (2)

+diff -r 86b22a931417 storages/backends/s3.py
+--- a/storages/backends/s3.py	Thu Jan 21 22:04:37 2010 +0000
++++ b/storages/backends/s3.py	Thu Jan 21 22:06:17 2010 +0000
+@@ -72,7 +72,7 @@ class S3Storage(Storage):
+         return os.path.normpath(name).replace('\\', '/')
+ 
+     def _put_file(self, name, content):
+-        if self.encrypt == True:
++        if self.encrypt:
+ 
+             # Create a key object
+             k = ezPyCrypto.key()
+@@ -114,7 +114,7 @@ class S3Storage(Storage):
+             raise IOError("S3StorageError: %s" % response.message)
+         headers = response.http_response.msg
+ 
+-        if self.encrypt == True:
++        if self.encrypt:
+             # Read in a private key
+             fd = open(settings.CRYPTO_KEYS_PRIV, "rb")
+             pubprivkey = fd.read()
 storages/backends/s3.py
+s3.py
 # Placed by Bitbucket