Skip to content

Commit

Permalink
Fix pyinstaller pack error
Browse files Browse the repository at this point in the history
  • Loading branch information
liuyug committed Feb 3, 2016
1 parent 3b66858 commit 6494de7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions homedns/adblock.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ def get_desc(self, vv):

class Adblock(object):
def __init__(self, obj):
if isinstance(obj, file):
fobj = obj
else:
if isinstance(obj, str):
fobj = open(obj)
else:
fobj = obj
self.blacklist = set()
self.whitelist = set()
for line in iter(fobj.readline, ''):
Expand Down
2 changes: 1 addition & 1 deletion pyinst.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@

rmdir build /s /q

pyinstaller --clean --noupx -c -F homedns.py
pyinstaller --clean --noupx -c -p homedns -F homedns.py

0 comments on commit 6494de7

Please sign in to comment.