[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnue] r7207 - trunk/gnue-common/src/datasources
From: |
johannes |
Subject: |
[gnue] r7207 - trunk/gnue-common/src/datasources |
Date: |
Tue, 15 Mar 2005 07:50:50 -0600 (CST) |
Author: johannes
Date: 2005-03-15 07:50:49 -0600 (Tue, 15 Mar 2005)
New Revision: 7207
Modified:
trunk/gnue-common/src/datasources/GDataSource.py
Log:
Don't be case-sensitive on appserver resources
Modified: trunk/gnue-common/src/datasources/GDataSource.py
===================================================================
--- trunk/gnue-common/src/datasources/GDataSource.py 2005-03-15 12:01:52 UTC
(rev 7206)
+++ trunk/gnue-common/src/datasources/GDataSource.py 2005-03-15 13:50:49 UTC
(rev 7207)
@@ -983,23 +983,30 @@
if len (parts) != 2:
raise ResourceNotFoundError, (element, elementName)
- (moduleName, className) = parts
- mc = GConditions.buildConditionFromDict ({'gnue_name': className,
- 'gnue_module.gnue_name': moduleName})
+ (moduleName, className) = map (string.lower, parts)
+ cond = ['and', ['eq', ['lower', ['field', 'gnue_name']],
+ ['const', className]],
+ ['eq', ['lower', ['field', 'gnue_module.gnue_name']],
+ ['const', moduleName]]]
+ mc = GConditions.buildTreeFromList (cond)
- rs = dts.createResultSet (mc)
- if rs.firstRecord ():
- paramDict ['connection'] = connection
+ try:
+ rs = dts.createResultSet (mc)
+ if rs.firstRecord ():
+ paramDict ['connection'] = connection
- res = rs.current.callFunc ("gnue_%s" % element, paramDict)
+ res = rs.current.callFunc ("gnue_%s" % element, paramDict)
- if debugFileName is not None:
- dfile = open (debugFileName, 'w')
- dfile.write (res.encode ('utf-8'))
- dfile.close ()
+ if debugFileName is not None:
+ dfile = open (debugFileName, 'w')
+ dfile.write (res.encode ('utf-8'))
+ dfile.close ()
- return cStringIO.StringIO (res.encode ('utf-8'))
+ return cStringIO.StringIO (res.encode ('utf-8'))
- else:
- raise ResourceNotFoundError, (element, elementName)
+ else:
+ raise ResourceNotFoundError, (element, elementName)
+ finally:
+ mc.breakReferences ()
+
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gnue] r7207 - trunk/gnue-common/src/datasources,
johannes <=