def _dbus_exception_to_reason(exc, args):
 error = exc.get_dbus_name()
 if (error == 'error.unknown_config'):
  return "Unknown configuration '{0}'".format(args['config'])
 elif (error == 'error.illegal_snapshot'):
  return 'Invalid snapshot'
 else:
  return exc.get_dbus_name()

def _dbus_exception_to_reason ( exc , args ) : error = exc . get_dbus_name ( ) if ( error == 'error.unknown_config' ) : return "Unknown configuration '{0}'" . format ( args [ 'config' ] ) elif ( error == 'error.illegal_snapshot' ) : return 'Invalid snapshot' else : return exc . get_dbus_name ( )
returns a error message from a snapper dbusexception .