From 0e14e6c8131e49b79e45e7372672a54a7429434b Mon Sep 17 00:00:00 2001 From: Quentin Smith Date: Thu, 11 Oct 2007 04:09:01 -0400 Subject: [PATCH] Bugfixes to make it run svn path=/trunk/dhcp/; revision=190 --- dhcpserver.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/dhcpserver.py b/dhcpserver.py index 5c7721c..af21b16 100644 --- a/dhcpserver.py +++ b/dhcpserver.py @@ -1,9 +1,15 @@ #!/usr/bin/python +import sys.path +sys.path.append('pydhcplib/') import pydhcplib +import pydhcplib.dhcp_network from pydhcplib.dhcp_packet import * from pydhcplib.type_hw_addr import hwmac from pydhcplib.type_ipv4 import ipv4 +import event_logger +if '__main__' == __name__: + event_logger.init("stdout", 'INFO', {}) from event_logger import Log import sipb_xen_database @@ -70,7 +76,7 @@ class DhcpServer(pydhcplib.dhcp_network.DhcpServer): Log.Output(Log.debug, "__init__ DhcpServer") def SendPacket(self, packet): - """Encode and send the packet.""" + """Encode and send the packet.""" giaddr = packet.GetOption('giaddr') @@ -149,7 +155,6 @@ class DhcpServer(pydhcplib.dhcp_network.DhcpServer): # FIXME : what if false ? if '__main__' == __name__: - event_logger.init("stdout", event_logger.INFO, {}) options = { "server_listen_port":67, "client_listen_port":68, "listen_address":"0.0.0.0"} -- 1.7.9.5