def error(self):
        """Return user-friendly error message."""
        try:
            errcode = DeviceErrorCode(self.error_code)
            return "%s (%s): %s" % (errcode.name, errcode.value, self.error_message)
        except:
            return "Error %s: %s" % (self.error_code, self.error_message)
def error ( self ) : try : errcode = DeviceErrorCode ( self . error_code ) return "%s (%s): %s" % ( errcode . name , errcode . value , self . error_message ) except : return "Error %s: %s" % ( self . error_code , self . error_message )
Return user-friendly error message.