Index: /pykota/trunk/pykota/storages/sql.py
===================================================================
--- /pykota/trunk/pykota/storages/sql.py (revision 719)
+++ /pykota/trunk/pykota/storages/sql.py (revision 720)
@@ -15,4 +15,7 @@
 #
 # $Log$
+# Revision 1.8  2003/02/06 14:49:04  jalet
+# edpykota should be ok now
+#
 # Revision 1.7  2003/02/06 14:28:59  jalet
 # edpykota should be ok, minus some typos
@@ -50,5 +53,5 @@
         # storage should use fnmatch to match patterns and be storage agnostic
         result = self.doQuery("SELECT printername FROM printers;")
-        result = self.doParseResult()
+        result = self.doParseResult(result)
         if result is not None :
             for printer in result :
Index: /pykota/trunk/pykota/storages/postgresql.py
===================================================================
--- /pykota/trunk/pykota/storages/postgresql.py (revision 700)
+++ /pykota/trunk/pykota/storages/postgresql.py (revision 720)
@@ -15,4 +15,7 @@
 #
 # $Log$
+# Revision 1.3  2003/02/06 14:49:04  jalet
+# edpykota should be ok now
+#
 # Revision 1.2  2003/02/05 22:28:38  jalet
 # More robust storage
@@ -62,5 +65,5 @@
     def doParseResult(self, result) :
         """Returns the result as a list of Python mappings."""
-        if result.ntuples() > 0 :
+        if (result is not None) and (result.ntuples() > 0) :
             return result.dictresult()
         
Index: /pykota/trunk/bin/edpykota
===================================================================
--- /pykota/trunk/bin/edpykota (revision 719)
+++ /pykota/trunk/bin/edpykota (revision 720)
@@ -17,4 +17,7 @@
 #
 # $Log$
+# Revision 1.5  2003/02/06 14:49:04  jalet
+# edpykota should be ok now
+#
 # Revision 1.4  2003/02/06 14:28:59  jalet
 # edpykota should be ok, minus some typos
@@ -185,8 +188,8 @@
         
         # Initializes the command line tool
-        tool = EdPyKota(doc=__doc__)
+        editor = EdPyKota(doc=__doc__)
         
         # parse and checks the command line
-        (options, args) = tool.parseCommandline(sys.argv[1:], short_options, long_options)
+        (options, args) = editor.parseCommandline(sys.argv[1:], short_options, long_options)
         
         # sets long options
@@ -197,20 +200,20 @@
         options["groups"] = options["g"] or options["groups"] or defaults["groups"]
         options["prototype"] = options["p"] or options["prototype"]
-        options["printer"] = options["P"] or options["printer"]
+        options["printer"] = options["P"] or options["printer"] or defaults["printer"]
         options["softlimit"] = options["S"] or options["softlimit"]
         options["hardlimit"] = options["H"] or options["hardlimit"] 
         
         if options["help"] :
-            tool.display_usage_and_quit()
+            editor.display_usage_and_quit()
         elif options["version"] :
-            tool.display_version_and_quit()
+            editor.display_version_and_quit()
         elif options["users"] and options["groups"] :    
-            raise PyKotaToolError, "edpykota: options --users and --groups are incompatible.\n"
-        elif (options["softlimit"] or options["hardlimit"]) and optiions["prototype"] :    
-            raise PyKotaToolError, "edpykota: options --softlimit or --hardlimit and --prototype are incompatible.\n"
+            raise PyKotaToolError, "edpykota: options --users and --groups are incompatible."
+        elif (options["softlimit"] or options["hardlimit"]) and options["prototype"] :    
+            raise PyKotaToolError, "edpykota: options --softlimit or --hardlimit and --prototype are incompatible."
         elif options["groups"] :    
-            raise PyKotaToolError, "edpykota: options --groups is currently not implemented.\n"
+            raise PyKotaToolError, "edpykota: options --groups is currently not implemented."
         else :
-            sys.exit(apply(tool.main, args, options))
+            sys.exit(editor.main(args, options))
     except PyKotaToolError, msg :            
         sys.stderr.write("%s\n" % msg)
