mirror of
https://github.com/valitydev/SigmaHQ.git
synced 2024-11-08 02:08:54 +00:00
Merge pull request #378 from cclauss/patch-1
Use print() function in both Python 2 and Python 3
This commit is contained in:
commit
0ea3a681df
@ -162,12 +162,12 @@ for file in glob.glob(args.ruledir + "/*"):
|
|||||||
output_elast_config = re.sub(entry, str(convert_args[entry]), output_elast_config)
|
output_elast_config = re.sub(entry, str(convert_args[entry]), output_elast_config)
|
||||||
for entry in translate_func:
|
for entry in translate_func:
|
||||||
output_elast_config = re.sub(entry, translate_func[entry], output_elast_config)
|
output_elast_config = re.sub(entry, translate_func[entry], output_elast_config)
|
||||||
print "Converting file " + file
|
print("Converting file " + file)
|
||||||
with open(os.path.join(args.outdir, "sigma-" + file.split("/")[-1]), "w") as f:
|
with open(os.path.join(args.outdir, "sigma-" + file.split("/")[-1]), "w") as f:
|
||||||
f.write(output_elast_config)
|
f.write(output_elast_config)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
if args.debug:
|
if args.debug:
|
||||||
traceback.print_exc()
|
traceback.print_exc()
|
||||||
print "error " + str(file) + "----" + str(e)
|
print("error " + str(file) + "----" + str(e))
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user