Created
September 22, 2016 00:11
-
-
Save clayg/d8e2ed3e9ad55cd287da917be5ff0efe to your computer and use it in GitHub Desktop.
how to find ChunkWriteTimeout
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/swift/common/exceptions.py b/swift/common/exceptions.py | |
index f3e6337..c1dbea4 100644 | |
--- a/swift/common/exceptions.py | |
+++ b/swift/common/exceptions.py | |
@@ -126,7 +126,22 @@ class ChunkReadTimeout(Timeout): | |
class ChunkWriteTimeout(Timeout): | |
- pass | |
+ | |
+ def __init__(self, timeout): | |
+ if timeout == 60: | |
+ stack = [] | |
+ import inspect | |
+ frame = inspect.currentframe() | |
+ while frame.f_back and len(stack) < 30: | |
+ stack.append(str(frame.f_code)) | |
+ frame = frame.f_back | |
+ self.stack = stack | |
+ super(ChunkWriteTimeout, self).__init__(timeout) | |
+ | |
+ def __str__(self): | |
+ if hasattr(self, 'stack'): | |
+ return ''.join(self.stack) | |
+ return super(ChunkWriteTimeout, self).__str__() | |
class ConnectionTimeout(Timeout): |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment