Change get_version() to only return version number, not revision.

Added get_revision() to get svn revision number of build.
This commit is contained in:
Andrew Resch 2008-01-21 05:56:45 +00:00
parent fdb07b4929
commit f16092400d
1 changed files with 4 additions and 1 deletions

View File

@ -53,7 +53,10 @@ TORRENT_STATE = [
def get_version():
"""Returns the program version from the egg metadata"""
return pkg_resources.require("Deluge")[0].version
return pkg_resources.require("Deluge")[0].version.split("r")[0]
def get_revision():
return pkg_resources.require("Deluge")[0].version.split("r")[1]
def get_config_dir(filename=None):
""" Returns the config path if no filename is specified