#NEWLINE# def getCurrentShaping( self , dev ) : #NEWLINE# #INDENT# 'Get the TrafficControl object used to shape a\n            TrafficControlledDevice.\n\n        Args:\n            dev: a TrafficControlledDevice.\n\n        Returns:\n            A TrafficControl object representing the current shaping for the\n            device.\n\n        Raises:\n            A TrafficControlException if there is no TC object for that IP\n        ' #NEWLINE# self . logger . info ( 'Request getCurrentShaping for ip {0}' . format ( dev . controlledIP ) ) #NEWLINE# shaping = self . _current_shapings . get ( dev . controlledIP , { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } ) . get ( 'tc' ) #NEWLINE# if ( shaping is None ) : #NEWLINE# #INDENT# raise TrafficControlException ( code = ReturnCode . UNKNOWN_IP , message = 'This IP ({0}) is not being shaped' . format ( dev . controlledIP ) ) #NEWLINE# #UNINDENT# return self