summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPaul C. Buetow <paul@buetow.org>2014-04-12 14:08:41 +0200
committerPaul C. Buetow <paul@buetow.org>2014-04-12 14:08:41 +0200
commit60614b261052054fa054e2873c9ca8bb44b90c1c (patch)
tree30c8b55be52d41c5d7031a83a09041f08a049ed5 /src
parentab50035fbf7462de7439501d6dc1bf22de3008c6 (diff)
-V works now again
Diffstat (limited to 'src')
-rwxr-xr-xsrc/fapi.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/fapi.py b/src/fapi.py
index 881cf96..4a7b578 100755
--- a/src/fapi.py
+++ b/src/fapi.py
@@ -194,27 +194,27 @@ if __name__ == '__main__':
''' The main function, here we will have Popcorn for free! '''
parser = argparse.ArgumentParser()
- #parser.add_argument('-v', action='store_true', help='Verbose')
+ parser.add_argument('-v', action='store_true', help='Verbose')
parser.add_argument('-V', action='store_true', help='Print version')
parser.add_argument('-m', action='store', help='The lb method',
default='LB_METHOD_RATIO_LEAST_CONNECTION_MEMBER')
parser.add_argument('-C', action='store', help='Config file',
default=expanduser('~') + '/.fapi.conf')
- parser.add_argument('action', help='The action')
- parser.add_argument('arg', help='The argument for the action')
+ parser.add_argument('action', nargs='?', help='The action')
+ parser.add_argument('arg', nargs='?', help='The argument for the action')
parser.add_argument('subarg', nargs='?', help='A sub argument')
parser.add_argument('subarg2', nargs='?', help='Another sub argument')
#parser.add_argument('subarg3', nargs='?', help='Another sub argument')
args = parser.parse_args()
- fapi = Fapi(args)
-
if args.V:
print 'This is %s version %s' % (__program__, __version__)
sys.exit(0)
+ fapi = Fapi(args)
+
#try:
fapi.run()
#except Exception, e: