#702: Prepending notrans_ causes tg-admin sql create to fail
-----------------------+----------------------------------------------------
Reporter: anonymous | Owner: anonymous
Type: defect | Status: assigned
Priority: normal | Milestone: 0.9a3
Component: SQLObject | Version: 0.9a1
Severity: critical | Resolution:
Keywords: |
-----------------------+----------------------------------------------------
Changes (by Baruch <[EMAIL PROTECTED]>):
* severity: major => critical
Comment:
Another version, this one fixes yet another bug where the config file
wouldn't be loaded at all. Did anyone use tg-admin sql?
{{{
--- base.py.orig 2006-03-31 20:47:02.000000000 +0100
+++ base.py 2006-04-01 21:18:40.000000000 +0100
@@ -38,6 +38,7 @@
if config is None:
config = get_project_config()
if not os.path.isfile(config):
+ print 'config file %s not found or is not a file.' % config
return
ext = os.path.splitext(config)[1]
if ".py" == ext.lower():
@@ -58,10 +59,10 @@
"""Chooses the config file, trying to guess whether this is a
development or installed project."""
import cherrypy
- if not self.config:
- self.config = get_project_config()
- load_project_config(self.config)
+ load_project_config(self.config)
self.dburi = cherrypy.config.get("sqlobject.dburi", None)
+ if self.dburi and self.dburi.startswith("notrans_"):
+ self.dburi = self.dburi[8:]
class SQL(CommandWithDB):
"""Wrapper command for sqlobject-admin.
}}}
--
Ticket URL: <http://trac.turbogears.org/turbogears/ticket/702>
TurboGears <http://www.turbogears.org/>
TurboGears front-to-back web development
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears Tickets" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/turbogears-tickets
-~----------~----~----~----~------~----~------~--~---