]> scripts.mit.edu Git - wizard.git/blobdiff - wizard/command/quota.py
Refactor change directory code to be consistent and permissive.
[wizard.git] / wizard / command / quota.py
index 2a640c91f26db96458a434c15dce81b1418f37d5..18ae8d014c592fcc72ec7a25703487a6c9f9bd27 100644 (file)
@@ -5,11 +5,8 @@ import sys
 from wizard import command, scripts
 
 def main(argv, baton):
-    options, dirs = parse_args(argv, baton)
-    if not dirs:
-        dir = os.getcwd()
-    else:
-        dir = dirs[0]
+    options, args = parse_args(argv, baton)
+    dir = os.path.abspath(args[0]) if args else os.getcwd()
     r = scripts.get_quota_usage_and_limit(dir)
     if r[0] is None or r[1] is None:
         sys.exit(1)