Skip to content

Commit

Permalink
bug fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
henices committed Apr 8, 2014
1 parent d837d36 commit afa20a6
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions tcpdns.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,10 +223,8 @@ def main():
print '>> Enable Cache: %r' % (options.cache)
print '>> Now you can set dns server to 127.0.0.1'

os_name = os.name

if options.daemon:
if os_name == 'nt':
if os.name == 'nt':
raise Exception("Windows doesn't support daemon process")
else:
try:
Expand All @@ -236,7 +234,7 @@ def main():
print '*** Please install python-daemon'

try:
with daemon.DaemonContext():
with daemon.DaemonContext(detach_process=True):
main()
except:
main()

0 comments on commit afa20a6

Please sign in to comment.