Commit ce471b05 authored by Pierre-Elliott Bécue's avatar Pierre-Elliott Bécue

[analyse] Print de debug qui traîne, et changement de la syntaxe des arguments.

 * Le print permettait de vérifier que les arguments étaient bien fournis comme voulu.
 * Désormais, si on utilise --aid/cid/mac/ip, il faut fournir juste après l'argument une
 valeur.
parent 7da73906
......@@ -439,7 +439,6 @@ def pretty_header(args):
def self_call(args):
args = ["/usr/scripts/surveillance/analyse2.py"] + args
print args
subprocess.Popen(args, stdout=subprocess.PIPE)
if __name__ == "__main__":
......
......@@ -209,7 +209,7 @@ for elupload, eltype, elid in uploadeurs:
# On inscrit l'instance dans la table des avertis_hard
######################################################
curseur.execute("INSERT INTO avertis_upload_hard (type,id,date) VALUES ('%s','%d','now')"%(eltype,elid))
analyse.self_call(["--%s" % (self_call_type), "%s" % (elid), "--begin", "%s" % (orig), "--end", "%s" % (end), "--limit", "1000", "--fichier", "/usr/scripts/var/analyse/%s_%s_%s.txt" % (end.replace("/", "_").replace(":", "_").replace(" ", "_"), self_call_type, elid)])
analyse.self_call(["--%s" % (self_call_type), "%s" % (elid), "--dns", "--begin", "%s" % (orig), "--end", "%s" % (end), "--limit", "1000", "--fichier", "/usr/scripts/var/analyse/%s_%s_%s.txt" % (end.replace("/", "_").replace(":", "_").replace(" ", "_"), self_call_type, elid)])
except Exception as error:
sys.stderr.write("Blacklist de id=%s pour %s Mo échoué, %s\n" % (proprio.id(), elupload, error))
continue
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment