Skip to content

Commit

Permalink
Merge pull request geekcomputers#111 from lyywo333/master
Browse files Browse the repository at this point in the history
NameError: global name 'fd' is not defined
  • Loading branch information
geekcomputers authored Nov 29, 2016
2 parents 86763ca + e110498 commit 9c8b037
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion check_for_sqlite_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ def isSQLite3(filename):
if getsize(filename) < 100: # SQLite database file header is 100 bytes
return False
else:
Header = open(filename, 'rb').read(100)
fd = open(filename, 'rb')
Header = fd.read(100)
fd.close()

if Header[0:16] == 'SQLite format 3\000':
Expand Down

0 comments on commit 9c8b037

Please sign in to comment.