Changeset 7555 for TI12-security/trunk/MyProxyClient
- Timestamp:
- 29/09/10 16:33:29 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TI12-security/trunk/MyProxyClient/myproxy/script.py
r7554 r7555 33 33 34 34 from myproxy.client import MyProxyClient 35 35 36 36 37 def make_optparser(): … … 133 134 logname = os.environ.get('LOGNAME') 134 135 135 command = argv[1] 136 nArgs = len(argv) 137 if nArgs < 2: 138 op.error('No command set') 139 else: 140 command = argv[1] 136 141 137 142 # Catch example of just specifying --help or '-h' … … 139 144 argl = argv[1:2] 140 145 command = None 146 147 elif command != 'logon': 148 op.error('Command %s not supported' % command) 149 150 elif nArgs < 3: 151 op.error('No command options set') 152 141 153 else: 142 154 argl = argv[2:] 143 options, args = op.parse_args(argl) 155 156 options = op.parse_args(argl)[0] 144 157 145 158 if options.outfile is None: … … 174 187 myproxy = MyProxyClient(**client_props) 175 188 176 if command == 'logon': 177 do_logon(myproxy, options) 178 else: 179 op.error('Command %s not supported' % command) 189 do_logon(myproxy, options) 180 190 181 191
Note: See TracChangeset
for help on using the changeset viewer.