Skip to content

Commit

Permalink
Add sanity check on DB path
Browse files Browse the repository at this point in the history
The current error message is a bit cryptic
  • Loading branch information
nabla-c0d3 committed Nov 9, 2013
1 parent 97a16df commit 70415aa
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion analyzer/DBParser.py
Expand Up @@ -32,7 +32,7 @@ def __init__(self, dbPath):
argsAndReturnValue = self._sanitize_args_dict(plistlib.readPlistFromString(row[2].encode('utf-8')))))
rowid += 1
except sqlite3.Error as e:
print "Fatal error: %s" % e
#print "Fatal error: %s" % e
raise
finally:
if SqlConn:
Expand Down
5 changes: 5 additions & 0 deletions analyzer/introspy.py
Expand Up @@ -8,6 +8,7 @@
__copyright__ = "Copyright 2013, iSEC Partners, Inc."

from sys import argv
import os
from argparse import ArgumentParser
from re import match
from DBAnalyzer import DBAnalyzer
Expand Down Expand Up @@ -68,6 +69,10 @@ def main(argv):


# Process the DB
# Make sure it's there
if not os.path.exists(db_path): # Nice race condition
print 'Error: Could not find the DB file.'
return
analyzedDB = DBAnalyzer(db_path)


Expand Down

0 comments on commit 70415aa

Please sign in to comment.