diff --git a/deluge/main.py b/deluge/main.py index 9c65cf5fe..d515f4b96 100644 --- a/deluge/main.py +++ b/deluge/main.py @@ -47,6 +47,11 @@ from optparse import OptionParser import deluge.log import deluge.error +try: + from deluge._libtorrent import lt + lt_version = "\nlibtorrent: %s" % lt.version +except ImportError: + lt_version = "" def start_ui(): """Entry point for ui script""" @@ -54,7 +59,7 @@ def start_ui(): # Setup the argument parser parser = OptionParser(usage="%prog [options] [actions]", - version=deluge.common.get_version()) + version= "%prog: " + deluge.common.get_version() + lt_version) parser.add_option("-u", "--ui", dest="ui", help="""The UI that you wish to launch. The UI choices are:\n @@ -139,7 +144,7 @@ def start_daemon(): # Setup the argument parser parser = OptionParser(usage="%prog [options] [actions]", - version=deluge.common.get_version()) + version= "%prog: " + deluge.common.get_version() + lt_version) parser.add_option("-p", "--port", dest="port", help="Port daemon will listen on", action="store", type="int") parser.add_option("-i", "--interface", dest="interface", diff --git a/deluge/ui/ui.py b/deluge/ui/ui.py index 7465c8780..089be85a6 100644 --- a/deluge/ui/ui.py +++ b/deluge/ui/ui.py @@ -40,6 +40,12 @@ import deluge.common import deluge.configmanager import deluge.log +try: + from deluge._libtorrent import lt + lt_version = "\nlibtorrent: %s" % lt.version +except ImportError: + lt_version = "" + DEFAULT_PREFS = { "default_ui": "gtk" } @@ -53,7 +59,7 @@ class _UI(object): def __init__(self, name="gtk"): self.__name = name - self.__parser = OptionParser(version=deluge.common.get_version()) + self.__parser = OptionParser(version="%prog: " + deluge.common.get_version() + lt_version) group = OptionGroup(self.__parser, "Common Options") group.add_option("-c", "--config", dest="config",