Skip to content

Commit

Permalink
add some check code
Browse files Browse the repository at this point in the history
  • Loading branch information
henices committed Apr 5, 2014
1 parent 5e3c667 commit 22e23d0
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tcpdns.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,8 +229,11 @@ def main():
if os_name == 'nt':
raise Exception("Windows doesn't support daemon process")
else:
import daemon
print '>>> Run code in daemon process'
try:
import daemon
print '>>> Run code in daemon process'
except ImportError:
print '*** Please install python-daemon'

try:
with daemon.DaemonContext():
Expand Down

0 comments on commit 22e23d0

Please sign in to comment.