FIX: fixed the command-line
This commit is contained in:
parent
bd8b72c84f
commit
3242b7896f
11
dbfp.py
11
dbfp.py
|
@ -25,7 +25,8 @@ def compareFingerprintDir(filein, fpdir):
|
|||
def compareFingerprint(filein, filejson):
|
||||
db = fingerprint.DBSchema()
|
||||
db.scanDBFile(filein)
|
||||
db.compareDB(filejson)
|
||||
percent = db.compareDB(filejson)
|
||||
print "Percent match: {}".format(str(percent))
|
||||
|
||||
#
|
||||
def createFingerprint(filein, verbose, app_name, app_ver, notes):
|
||||
|
@ -115,14 +116,14 @@ def parseArgs():
|
|||
# parser.add_argument('-t', '--title', required=False)
|
||||
args = parser.parse_args()
|
||||
|
||||
if (args.file):
|
||||
createFingerprint(args.file, args.verbose, args.app_name, args.app_version, args.notes)
|
||||
if (args.file and args.fingerprint):
|
||||
compareFingerprint(args.file, args.fingerprint)
|
||||
elif (args.file and args.fpdir):
|
||||
compareFingerprintDir(args.file, args.fpdir)
|
||||
elif (args.file and args.fingerprint):
|
||||
compareFingerprint(args.file, args.fingerprint)
|
||||
elif (args.pull):
|
||||
fingerprintDir()
|
||||
elif (args.file):
|
||||
createFingerprint(args.file, args.verbose, args.app_name, args.app_version, args.notes)
|
||||
else:
|
||||
parser.print_help()
|
||||
|
||||
|
|
Loading…
Reference in New Issue