From de97c2578c709b19e96c0419c9482a5487ab20ce Mon Sep 17 00:00:00 2001 From: Cameron Dale Date: Sat, 15 Dec 2007 19:32:31 -0800 Subject: [PATCH] Make it also work from the command-line. --- apt-dht.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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() -- 2.39.5