コード例 #1
0
 def update(self, name, params):
     try:
         gingerAuditdispLock.acquire()
         for each_key in params:
             del_lines_of_attribute(each_key, AUDISPD_CONF)
             write_to_conf(each_key, params[each_key], AUDISPD_CONF)
     except OperationFailed:
         raise
     except Exception:
         raise OperationFailed("GINAUDISP0004E", {"name": name})
     finally:
         gingerAuditdispLock.release()
コード例 #2
0
ファイル: auditdisp.py プロジェクト: kimchi-project/ginger
 def update(self, name, params):
     try:
         gingerAuditdispLock.acquire()
         for each_key in params:
             del_lines_of_attribute(each_key, AUDISPD_CONF)
             write_to_conf(each_key, params[each_key], AUDISPD_CONF)
     except OperationFailed:
         raise
     except Exception:
         raise OperationFailed("GINAUDISP0004E", {"name": name})
     finally:
         gingerAuditdispLock.release()
コード例 #3
0
 def update(self, name, params):
     try:
         gingerAuditPluginLock.acquire()
         path_to_plugin = os.path.join(plugins_dir, name + ".conf")
         if not os.path.isfile(path_to_plugin):
             raise NotFoundError("GINAUDISP0006E", {'name': name})
         for each_key in params:
             del_lines_of_attribute(each_key, path_to_plugin)
             write_to_conf(each_key, params[each_key], path_to_plugin)
     except NotFoundError:
         raise
     except OperationFailed:
         raise
     except Exception:
         raise OperationFailed("GINAUDISP0004E", {"name": name})
     finally:
         gingerAuditPluginLock.release()
コード例 #4
0
 def update(self, name, params):
     try:
         gingerAuditPluginLock.acquire()
         path_to_plugin = os.path.join(plugins_dir, name + ".conf")
         if not os.path.isfile(path_to_plugin):
             raise NotFoundError("GINAUDISP0006E", {"name": name})
         for each_key in params:
             del_lines_of_attribute(each_key, path_to_plugin)
             write_to_conf(each_key, params[each_key], path_to_plugin)
     except NotFoundError:
         raise
     except OperationFailed:
         raise
     except Exception:
         raise OperationFailed("GINAUDISP0004E", {"name": name})
     finally:
         gingerAuditPluginLock.release()