Index: trunk/packages/invirt-database/debian/changelog
===================================================================
--- trunk/packages/invirt-database/debian/changelog	(revision 2197)
+++ trunk/packages/invirt-database/debian/changelog	(revision 2198)
@@ -14,6 +14,7 @@
   * refactor code that sets values
   * print full help on no arguments
-
- -- Greg Price <price@mit.edu>  Thu, 26 Feb 2009 22:51:43 -0500
+  * make EIBTI imports
+
+ -- Greg Price <price@mit.edu>  Fri, 27 Feb 2009 02:16:28 -0500
 
 invirt-database (0.1.7) unstable; urgency=low
Index: trunk/packages/invirt-database/scripts/invirt-quota
===================================================================
--- trunk/packages/invirt-database/scripts/invirt-quota	(revision 2197)
+++ trunk/packages/invirt-database/scripts/invirt-quota	(revision 2198)
@@ -7,10 +7,11 @@
 """
 
-from invirt.database import *
-from sys import argv, exit, stderr, stdout
-from optparse import OptionParser
+import sys
+import optparse
+
+from invirt import database
 
 def main(argv):
-    parser = OptionParser(usage = '%prog <owner> [options]',
+    parser = optparse.OptionParser(usage = '%prog <owner> [options]',
             description = __doc__.strip())
     parser.add_option('-m', '--ram-total',
@@ -41,26 +42,25 @@
 
     if len(args) != 1:
-        parser.print_help(stderr)
+        parser.print_help(sys.stderr)
         return 1
     owner = args[0]
-    connect()
-    session.begin()
+    database.connect()
+    database.session.begin()
     
-    x = Owner.query().filter_by(owner_id=owner).first()
+    x = database.Owner.query().filter_by(owner_id=owner).first()
     if x is None:
-        x = Owner(owner_id=owner)
+        x = database.Owner(owner_id=owner)
 
     for resource, scope in [('ram',  'total'), ('ram',  'single'),
                             ('disk', 'total'), ('disk', 'single'),
                             ('vms',  'total'), ('vms',  'active')]:
-        opt = getattr(opts, resource+scope)
-        if opt is not None:
-            val = int(opt)
+        val = getattr(opts, resource+scope)
+        if val is not None:
             setattr(x, resource+'_quota_'+scope, val if val >= 0 else None)
 
-    session.commit()
+    database.session.commit()
     print str(x)
     return 0
 
 if __name__ == '__main__':
-    exit(main(argv))
+    sys.exit(main(sys.argv))
