walmgr.py: add --version option
authorMartin Pihlak <martin.pihlak@gmail.com>
Tue, 27 Jul 2010 07:33:20 +0000 (10:33 +0300)
committerMartin Pihlak <martin.pihlak@gmail.com>
Tue, 27 Jul 2010 07:33:20 +0000 (10:33 +0300)
python/walmgr.py

index d5b60d6fe56b61920998b51d88d5bfc964ac0f26..d880ef8770067666e1786102242ed2a2542a7a58 100755 (executable)
@@ -261,6 +261,9 @@ class WalMgr(skytools.DBScript):
 
     def __init__(self, args):
 
+        if len(args) == 1 and args[0] == '--version':
+           skytools.DBScript.__init__(self, 'wal-master', args)
+
         if len(args) < 2:
             # need at least config file and command
             usage(1)