Repository: libcloud Updated Branches: refs/heads/trunk c61db674e -> 79680b56e
Specify default value for pop, no need to catch ValueError since passing in a non int/float would be a programmer error which means we should indeed throw. Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/b326b8ba Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/b326b8ba Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/b326b8ba Branch: refs/heads/trunk Commit: b326b8ba2692a9181a10a42fb79db6bb8c6ed011 Parents: c61db67 Author: Tomaz Muraus <[email protected]> Authored: Sun Jul 19 18:09:04 2015 +0800 Committer: Tomaz Muraus <[email protected]> Committed: Sun Jul 19 18:09:04 2015 +0800 ---------------------------------------------------------------------- libcloud/common/exceptions.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/libcloud/blob/b326b8ba/libcloud/common/exceptions.py ---------------------------------------------------------------------- diff --git a/libcloud/common/exceptions.py b/libcloud/common/exceptions.py index 518d5c1..82fde36 100644 --- a/libcloud/common/exceptions.py +++ b/libcloud/common/exceptions.py @@ -47,10 +47,7 @@ class RateLimitReachedError(BaseHTTPError): message = "{code} Rate limit exceeded".format(code=code) def __init__(self, *args, **kwargs): - try: - self.retry_after = int(kwargs.pop('retry_after')) - except (KeyError, ValueError): - self.retry_after = 0 + self.retry_after = int(kwargs.pop('retry_after', 0)) _error_classes = [RateLimitReachedError]
