<s> """<STR_LIT>""" <EOL> from boto . beanstalk . layer1 import Layer1 <EOL> import boto . beanstalk . response <EOL> from boto . exception import BotoServerError <EOL> import boto . beanstalk . exception as exception <EOL> def beanstalk_wrapper ( func , name ) : <EOL> def _wrapped_low_level_api ( * args , ** kwargs ) : <EOL> try : <EOL> response = func ( * args , ** kwargs ) <EOL> except BotoServerError as e : <EOL> raise exception . simple ( e ) <EOL> cls_name = '<STR_LIT>' . join ( [ part . capitalize ( ) for part in name . split ( '<STR_LIT:_>' ) ] ) + '<STR_LIT>' <EOL> cls = getattr ( boto . beanstalk . response , cls_name ) <EOL> return cls ( response ) <EOL> return _wrapped_low_level_api <EOL> class Layer1Wrapper ( object ) : <EOL> def __init__ ( self , * args , ** kwargs ) : <EOL> self . api = Layer1 ( * args , ** kwargs ) <EOL> def __getattr__ ( self , name ) : <EOL> try : <EOL> return beanstalk_wrapper ( getattr ( self . api , name ) , name ) <EOL> except AttributeError : <EOL> raise AttributeError ( "<STR_LIT>" % ( self , name ) ) </s>
