[Collab-qa-commits] r1281 - udd

zack at alioth.debian.org zack at alioth.debian.org
Fri Sep 19 14:19:28 UTC 2008


Author: zack
Date: 2008-09-19 14:19:27 +0000 (Fri, 19 Sep 2008)
New Revision: 1281

Modified:
   udd/udd.py
Log:
- add some TODO items
- enlarge the set of commands returned by help


Modified: udd/udd.py
===================================================================
--- udd/udd.py	2008-09-19 14:07:07 UTC (rev 1280)
+++ udd/udd.py	2008-09-19 14:19:27 UTC (rev 1281)
@@ -12,8 +12,7 @@
 import udd.aux
 import os.path
 
-available_commands = [ 'run', 'update' ]
-# available_commands = [ 'run', 'setup', 'drop', 'update', 'schema', 'tables' ]
+available_commands = [ 'run', 'setup', 'drop', 'update', 'schema', 'tables' ]
 
 def print_help():
   print "Usage: %s CONF_FILE COMMAND SOURCE [SOURCE ...]" % sys.argv[0]
@@ -62,6 +61,11 @@
 	if src_command == "exec":
 	  system(rest + " " + sys.argv[1] + " " + sys.argv[2] + " " + src)
 	elif src_command == "module":
+          # TODO XXX: using exec is hackish and prone to failures due
+          # to what is being written in the conffile. We should get
+          # rid of these lines and use the "imp" module, which is
+          # meant for these tasks:
+          # http://docs.python.org/lib/module-imp.html
 	  exec("import " + rest)
 	  exec "gatherer = " + rest + ".get_gatherer(connection, config, src)"
 	  if command == 'tables':




More information about the Collab-qa-commits mailing list