Fix: ConfigParser add_argument -> add_option.
authorRadek Brich <brich.radek@ifortuna.cz>
Fri, 16 Aug 2013 13:19:26 +0200
changeset 86 b61b54aa9f96
parent 85 11a282e23e0d
child 87 3ef717ee9253
Fix: ConfigParser add_argument -> add_option.
pgtoolkit/pgbrowser.py
runquery.py
--- a/pgtoolkit/pgbrowser.py	Thu Aug 08 15:26:24 2013 +0200
+++ b/pgtoolkit/pgbrowser.py	Fri Aug 16 13:19:26 2013 +0200
@@ -417,7 +417,11 @@
         return self._query('''select pg_get_functiondef(%s);''', [oid])
 
     def list_types(self, schema='public'):
-        """List types in schema."""
+        """List types in schema.
+
+        http://www.postgresql.org/docs/8.4/static/catalog-pg-type.html
+
+        """
         return self._query('''
             SELECT
                 t.typname AS "name",
--- a/runquery.py	Thu Aug 08 15:26:24 2013 +0200
+++ b/runquery.py	Fri Aug 16 13:19:26 2013 +0200
@@ -20,9 +20,9 @@
         self.parser.add_argument('-c', dest='config', type=str, help='Additional config file (besides pgtoolkit.conf).')
         self.parser.add_argument('-q', dest='queries', metavar='QUERY', nargs='*', help='Queries to run.')
 
-        self.config.add_argument('target', type=str, default=None)
-        self.config.add_argument('queries', type=list, default=[])
-        self.config.add_argument('log_path', type=str)
+        self.config.add_option('target', type=str, default=None)
+        self.config.add_option('queries', type=list, default=[])
+        self.config.add_option('log_path', type=str)
 
         self.target_isolation_level = 'autocommit'