Skip to content

Commit f2cdcf1

Browse files
committed
Merge pull request #227 from tseaver/silence_py26_deprecation_for_exception_message
Silence Python 2.6 deprecation of exception.message.
2 parents 941a2c7 + 37df55f commit f2cdcf1

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

gcloud/storage/exceptions.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ class ConnectionError(StorageError):
77
def __init__(self, response, content):
88
message = str(response) + content
99
super(ConnectionError, self).__init__(message)
10+
# suppress deprecation warning under 2.6.x
11+
self.message = message
1012

1113

1214
class NotFoundError(ConnectionError):

0 commit comments

Comments
 (0)