mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2024-12-19 13:07:56 +00:00
runner.py: make 'allmydata-tahoe --version' emit version numbers of everything
This commit is contained in:
parent
20c980d02b
commit
9be3da03f6
@ -9,7 +9,8 @@ class Options(usage.Options):
|
||||
synopsis = "Usage: allmydata <command> [command options]"
|
||||
|
||||
optFlags = [
|
||||
["quiet", "q", "operate silently"],
|
||||
["quiet", "q", "Operate silently."],
|
||||
["version", "V", "Display version numbers and exit."],
|
||||
]
|
||||
|
||||
subCommands = []
|
||||
@ -18,6 +19,15 @@ class Options(usage.Options):
|
||||
subCommands += debug.subCommands
|
||||
subCommands += cli.subCommands
|
||||
|
||||
def opt_version(self):
|
||||
from twisted import copyright
|
||||
import allmydata, zfec, foolscap
|
||||
print "Twisted version:", copyright.version
|
||||
print "Foolscap version:", foolscap.__version__
|
||||
print "zfec version:", zfec.__version__
|
||||
print "allmydata version:", allmydata.__version__
|
||||
sys.exit(0)
|
||||
|
||||
def postOptions(self):
|
||||
if not hasattr(self, 'subOptions'):
|
||||
raise usage.UsageError("must specify a command")
|
||||
|
Loading…
Reference in New Issue
Block a user