Skip to content

Commit

Permalink
Fixed the bug that 'tm' was undefined in dhcp daemon.
Browse files Browse the repository at this point in the history
  • Loading branch information
yurivict committed May 17, 2015
1 parent 013e649 commit 1a984dc
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions tiny-dhcp-server.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,8 @@ def log(s):
with open(logfile(), "a") as myfile:
myfile.write('%s %s\n' % (tu.tm_log(), s))
def log_discard(what):
if arg_daemonize:
with open(logfile(), "a") as myfile:
myfile.write('%s discarded %s\n' % (tm(), what))
else:
sys.stderr.write('%s discarded %s\n' % (tm(), what))
with open(logfile(), "a") as myfile:
myfile.write('%s discarded %s\n' % (tm_log(), what))

##
## MAIN
Expand Down

0 comments on commit 1a984dc

Please sign in to comment.