Commit 27fdf4e1 authored by Leigh B. Stoller's avatar Leigh B. Stoller
Browse files

Minor fix to swapexp; allow either -s in|out, or just plain in|out.

parent 68307cfd
......@@ -1173,7 +1173,7 @@ class swapexp:
def apply(self):
try:
opts, req_args = getopt.getopt(self.argv, "we:", [ "help" ]);
opts, req_args = getopt.getopt(self.argv, "we:s:", [ "help" ]);
pass
except getopt.error, e:
print e.args[0]
......@@ -1188,6 +1188,9 @@ class swapexp:
elif opt == "-w":
params["wait"] = "yes"
pass
elif opt == "-s":
params["direction"] = val
pass
elif opt == "-e":
pid,eid = string.split(val, ",")
params["proj"] = pid;
......@@ -1204,11 +1207,12 @@ class swapexp:
self.usage();
return -1;
params["proj"] = req_args[0];
params["exp"] = req_args[1];
params["direction"] = req_args[2];
params["proj"] = req_args[0];
params["exp"] = req_args[1];
req_args = req_args[2:];
pass
elif len(req_args) != 1:
if not params.has_key("direction") && len(req_args) != 1:
self.usage();
return -1;
else:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment