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
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)