Convert scripts to python3

This commit is contained in:
TKE
2021-03-16 20:08:46 +01:00
parent a03c3d3763
commit 23c6dfecf6
2 changed files with 17 additions and 17 deletions

View File

@@ -1,16 +1,16 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import argparse
import binascii
import ConfigParser
import configparser
import sys
from pybloom import BloomFilter
def main():
default_config_file='/nsrl/nsrl.conf'
config = ConfigParser.ConfigParser()
config = configparser.ConfigParser()
config.read(default_config_file)
#add commandline options
hash_type=config.get('config','hashfile_type')
@@ -54,11 +54,11 @@ def main():
output = "{}".format(hash_hex)
else:
output = "{}:{}".format("+"if hash_is_a_match else "-",hash_hex)
print output
print(output)
return
if __name__ == "__main__":
try:
main()
except Exception as e:
print "Error: %s" % e
print("Error: %s" % e)