Updating for production
git-svn-id: https://tftpy.svn.sourceforge.net/svnroot/tftpy/trunk@16 63283fd4-ec1e-0410-9879-cb7f675518da
This commit is contained in:
parent
19e8f0f14c
commit
cb75a4b281
2 changed files with 2 additions and 15 deletions
|
@ -7,12 +7,6 @@ import tftpy
|
|||
def main():
|
||||
usage=""
|
||||
parser = OptionParser(usage=usage)
|
||||
parser.add_option('-t',
|
||||
'--test',
|
||||
action='store_true',
|
||||
dest='test',
|
||||
help='run test case(s)',
|
||||
default=False)
|
||||
parser.add_option('-H',
|
||||
'--host',
|
||||
action='store',
|
||||
|
@ -42,11 +36,6 @@ def main():
|
|||
help='output file (default: out)',
|
||||
default='out')
|
||||
options, args = parser.parse_args()
|
||||
if options.test:
|
||||
options.host = "216.191.234.113"
|
||||
options.port = 20001
|
||||
options.filename = 'ipp510main.bin'
|
||||
options.output = 'ipp510main.bin'
|
||||
if not options.host or not options.filename:
|
||||
parser.print_help()
|
||||
sys.exit(1)
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#!/usr/bin/python
|
||||
"""Disclaimer: This is just a placeholder. I do not yet support Twisted
|
||||
Python."""
|
||||
|
||||
from twisted.internet import reactor, protocol
|
||||
|
||||
|
@ -9,9 +10,6 @@ class TFTPProtocolFactory(protocol.ClientFactory):
|
|||
protocol = TFTPProtocol
|
||||
|
||||
def main():
|
||||
host = '216.191.234.113'
|
||||
port = 20001
|
||||
|
||||
reactor.listenUDP(port, TFTPProtocolFactory())
|
||||
reactor.run()
|
||||
|
||||
|
|
Reference in a new issue