commit-gnue
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

r6369 - trunk/gnue-common/src/datasources


From: johannes
Subject: r6369 - trunk/gnue-common/src/datasources
Date: Wed, 22 Sep 2004 03:33:26 -0500 (CDT)

Author: johannes
Date: 2004-09-22 03:33:26 -0500 (Wed, 22 Sep 2004)
New Revision: 6369

Modified:
   trunk/gnue-common/src/datasources/GDataSource.py
Log:
Fixed handling of appserver://... style urls


Modified: trunk/gnue-common/src/datasources/GDataSource.py
===================================================================
--- trunk/gnue-common/src/datasources/GDataSource.py    2004-09-22 08:06:38 UTC 
(rev 6368)
+++ trunk/gnue-common/src/datasources/GDataSource.py    2004-09-22 08:33:26 UTC 
(rev 6369)
@@ -690,7 +690,13 @@
   if url [:12].lower () != 'appserver://':
     raise InvalidURLError, url
 
-  parts = url [12:].split ('/')
+  if '?' in url:
+    (appUrl, options) = url [12:].split ('?')
+  else:
+    appUrl  = url [12:]
+    options = None
+
+  parts = appUrl.split ('/')
   if len (parts) != 3:
     raise InvalidURLError, url
   (connection, element, elementName) = parts [:3]
@@ -703,10 +709,8 @@
 
   elementParams = {}
 
-  if '?' in elementName:
-    (elementName, paramString) = elementName.split ('?')
-
-    for part in paramString.split (';'):
+  if options:
+    for part in options.split (';'):
       (item, value) = part.split ('=')
       elementParams [item] = value
 





reply via email to

[Prev in Thread] Current Thread [Next in Thread]