From: Cameron Dale Date: Sun, 16 Dec 2007 03:32:31 +0000 (-0800) Subject: Make it also work from the command-line. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=de97c2578c709b19e96c0419c9482a5487ab20ce;p=quix0rs-apt-p2p.git Make it also work from the command-line. --- diff --git a/apt-dht.py b/apt-dht.py index 30b6a93..fe63bd3 100644 --- a/apt-dht.py +++ b/apt-dht.py @@ -17,7 +17,7 @@ from twisted.python import usage, log from twisted.web2 import channel from apt_dht import AptDHT -from apt_dht_conf import config +from apt_dht_conf import config, version config_file = [] @@ -28,11 +28,11 @@ if __name__ == '__main__': ['help', 'h'], ] optParameters = [ - ['config-file', 'c', None, "Configuration file"], + ['config-file', 'c', [], "Configuration file"], ] longdesc="apt-dht is a peer-to-peer downloader for apt users" def opt_version(self): - print "apt-dht 1.9.x" + print "apt-dht %s" % version.short() sys.exit(0) opts = AptDHTOptions()