align internal name 'pis' -> 'reg_pis' in sfi.py
authorThierry Parmentelat <thierry.parmentelat@inria.fr>
Sun, 4 May 2014 20:41:50 +0000 (16:41 -0400)
committerThierry Parmentelat <thierry.parmentelat@inria.fr>
Sun, 4 May 2014 20:41:50 +0000 (16:41 -0400)
sfa/client/sfi.py

index e21a618..b2ba2a0 100644 (file)
@@ -208,8 +208,8 @@ def load_record_from_opts(options):
         record_dict['reg-researchers'] = options.reg_researchers
     if hasattr(options, 'email') and options.email:
         record_dict['email'] = options.email
-    if hasattr(options, 'pis') and options.pis:
-        record_dict['reg-pis'] = options.pis
+    if hasattr(options, 'reg_pis') and options.reg_pis:
+        record_dict['reg-pis'] = options.reg_pis
 
     # handle extra settings
     record_dict.update(options.extras)
@@ -425,7 +425,7 @@ class Sfi:
             parser.add_option('-r', '--researchers', dest='reg_researchers', metavar='<researchers>', 
                               help='Set/replace slice researchers - use -r none to reset', default=None, type="str", action='callback', 
                               callback=optparse_listvalue_callback)
-            parser.add_option('-p', '--pis', dest='pis', metavar='<PIs>', help='Set/replace Principal Investigators/Project Managers',
+            parser.add_option('-p', '--pis', dest='reg_pis', metavar='<PIs>', help='Set/replace Principal Investigators/Project Managers',
                               default='', type="str", action='callback', callback=optparse_listvalue_callback)
             parser.add_option ('-X','--extra',dest='extras',default={},type='str',metavar="<EXTRA_ASSIGNS>",
                                action="callback", callback=optparse_dictvalue_callback, nargs=1,