Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(858)

Unified Diff: tools/telemetry/third_party/gsutil/third_party/boto/boto/beanstalk/wrapper.py

Issue 1260493004: Revert "Add gsutil 4.13 to telemetry/third_party" (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: tools/telemetry/third_party/gsutil/third_party/boto/boto/beanstalk/wrapper.py
diff --git a/tools/telemetry/third_party/gsutil/third_party/boto/boto/beanstalk/wrapper.py b/tools/telemetry/third_party/gsutil/third_party/boto/boto/beanstalk/wrapper.py
deleted file mode 100644
index eea1124a9e6d70cd4350556e2fe6b37b7210a22d..0000000000000000000000000000000000000000
--- a/tools/telemetry/third_party/gsutil/third_party/boto/boto/beanstalk/wrapper.py
+++ /dev/null
@@ -1,29 +0,0 @@
-"""Wraps layer1 api methods and converts layer1 dict responses to objects."""
-from boto.beanstalk.layer1 import Layer1
-import boto.beanstalk.response
-from boto.exception import BotoServerError
-import boto.beanstalk.exception as exception
-
-
-def beanstalk_wrapper(func, name):
- def _wrapped_low_level_api(*args, **kwargs):
- try:
- response = func(*args, **kwargs)
- except BotoServerError as e:
- raise exception.simple(e)
- # Turn 'this_is_a_function_name' into 'ThisIsAFunctionNameResponse'.
- cls_name = ''.join([part.capitalize() for part in name.split('_')]) + 'Response'
- cls = getattr(boto.beanstalk.response, cls_name)
- return cls(response)
- return _wrapped_low_level_api
-
-
-class Layer1Wrapper(object):
- def __init__(self, *args, **kwargs):
- self.api = Layer1(*args, **kwargs)
-
- def __getattr__(self, name):
- try:
- return beanstalk_wrapper(getattr(self.api, name), name)
- except AttributeError:
- raise AttributeError("%s has no attribute %r" % (self, name))

Powered by Google App Engine
This is Rietveld 408576698