Fix #1505: Add libtorrent info to --version output
This commit is contained in:
parent
b81159f295
commit
f0c327a024
|
@ -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",
|
||||
|
|
|
@ -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",
|
||||
|
|
Loading…
Reference in New Issue