]> scripts.mit.edu Git - wizard.git/blobdiff - wizard/command/quota.py
Fix bug where php.ini not being rewritten for MediaWiki.
[wizard.git] / wizard / command / quota.py
index 2a640c91f26db96458a434c15dce81b1418f37d5..3e1454141d67092f1690d58e1efe5de7d87bbdce 100644 (file)
@@ -2,16 +2,13 @@ import logging
 import os.path
 import sys
 
-from wizard import command, scripts
+from wizard import command, user
 
 def main(argv, baton):
-    options, dirs = parse_args(argv, baton)
-    if not dirs:
-        dir = os.getcwd()
-    else:
-        dir = dirs[0]
-    r = scripts.get_quota_usage_and_limit(dir)
-    if r[0] is None or r[1] is None:
+    options, args = parse_args(argv, baton)
+    dir = os.path.abspath(args[0]) if args else os.getcwd()
+    r = user.quota(dir)
+    if r is None:
         sys.exit(1)
     print "%d %d" % r
 
@@ -26,7 +23,7 @@ Output format is:
 
     USED AVAIL
 
-In bytes.  Returns an exit code of 1 if quota could
+in bytes.  Returns an exit code of 1 if quota could
 not be determined."""
     parser = command.WizardOptionParser(usage)
     options, args = parser.parse_all(argv)