]> git.mxchange.org Git - quix0rs-apt-p2p.git/commitdiff
Make it also work from the command-line.
authorCameron Dale <camrdale@gmail.com>
Sun, 16 Dec 2007 03:32:31 +0000 (19:32 -0800)
committerCameron Dale <camrdale@gmail.com>
Sun, 16 Dec 2007 03:32:31 +0000 (19:32 -0800)
apt-dht.py

index 30b6a93a88d082230e90fbf38467e4dc94dd69f6..fe63bd302d661505ecdc5b5d158a3f4aa446e70f 100644 (file)
@@ -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()