From 50bf405eda62839b1d28dd7c6421be35abd7ee87 Mon Sep 17 00:00:00 2001 From: "Paul C. Buetow" Date: Wed, 16 Apr 2014 08:06:08 +0200 Subject: fix print_version and remove ./-m switch --- src/fapi | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/fapi b/src/fapi index 0d0d3fb..0971d5f 100755 --- a/src/fapi +++ b/src/fapi @@ -20,12 +20,14 @@ __program__ = 'fapi' __version__ = 'VERSION_DEVEL' # Replaced by a Makefile tsubet __prompt__ = '>>>' # Default prompt +def print_version(): + print 'This is %s version %s' % (__program__, __version__) def print_synopsis(): ''' Prints the full Synopsis string ''' + print_version() print "\n".join([ - 'This is %s version %s' % (__program__, __version__), '', 'Synopsis:', ' fapi monitor', @@ -230,7 +232,7 @@ class Fapi(object): elif a.sub == 'create': poolmembers = [] - method = a.m + method = 'LB_METHOD_ROUND_ROBIN' if a.sub3: for x in a.sub3.split(','): fqdn, ip, port = self.lookup(x) @@ -434,8 +436,6 @@ if __name__ == '__main__': parser.add_argument('-h', action='store_true', help='Help') 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 default lbmethod', - default='LB_METHOD_ROUND_ROBIN') parser.add_argument('-C', action='store', help='Config file', default=expanduser('~') + '/.fapi.conf') @@ -456,6 +456,7 @@ if __name__ == '__main__': sys.exit(0) if args.V: + print_version() sys.exit(0) fapi = Fapi(args) -- cgit v1.2.3