From 67f861014762520ed468b01c62556280a8851f75 Mon Sep 17 00:00:00 2001 From: Thierry Parmentelat Date: Tue, 5 Nov 2013 12:29:07 +0100 Subject: [PATCH] fix options to sfi myslice for selecting a custom backend --- sfa/client/sfi.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/sfa/client/sfi.py b/sfa/client/sfi.py index 2f8a2a8f..8793da37 100644 --- a/sfa/client/sfi.py +++ b/sfa/client/sfi.py @@ -1493,8 +1493,9 @@ $ sfi myslice $ sfi -v myslice -- or sfi -vv myslice same but with more and more verbosity -$ sfi m +$ sfi m -b http://mymanifold.foo.com:7080/ is synonym to sfi myslice as no other command starts with an 'm' + and uses a custom backend for this one call """ ) # register_command def myslice (self, options, args): @@ -1518,13 +1519,13 @@ $ sfi m # (a) rain check for sufficient config in sfi_config myslice_dict={} - myslice_keys=['backend', 'delegate', 'platform', 'username'] + myslice_keys=[ 'backend', 'delegate', 'platform', 'username'] for key in myslice_keys: value=None # oct 2013 - I'm finding myself juggling with config files # so a couple of command-line options can now override config - if hasattr(args,key): - value=getattr(args,key) + if hasattr(options,key) and getattr(options,key) is not None: + value=getattr(options,key) else: full_key="MYSLICE_" + key.upper() value=getattr(self.config_instance,full_key,None) -- 2.43.0