[GRASS-SVN] r47382 - grass-addons/grass7/gui/wxpython/wx.wms

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Aug 3 12:34:53 EDT 2011


Author: sudeepsingh
Date: 2011-08-03 09:34:53 -0700 (Wed, 03 Aug 2011)
New Revision: 47382

Modified:
   grass-addons/grass7/gui/wxpython/wx.wms/addserver.py
   grass-addons/grass7/gui/wxpython/wx.wms/parse.py
   grass-addons/grass7/gui/wxpython/wx.wms/wmsmenu.py
Log:
bugs fixed, username, password not necessary, non ascii username accepted

Modified: grass-addons/grass7/gui/wxpython/wx.wms/addserver.py
===================================================================
--- grass-addons/grass7/gui/wxpython/wx.wms/addserver.py	2011-08-03 16:33:44 UTC (rev 47381)
+++ grass-addons/grass7/gui/wxpython/wx.wms/addserver.py	2011-08-03 16:34:53 UTC (rev 47382)
@@ -166,7 +166,8 @@
         #self.ServerList.Append(newServerName+" "+newUrl)
         
         url = newUrl.split()
-        if(len(newUrl) != 0 and len(newServerName) != 0 and len(newUserName) !=0 and len(newPassword) != 0 ):
+        #if(len(newUrl) != 0 and len(newServerName) != 0 and len(newUserName) !=0 and len(newPassword) != 0 ):
+        if(len(newUrl) != 0 and len(newServerName) != 0):
             serverData.servername = newServerName
             serverData.url = newUrl
             serverData.username = newUserName

Modified: grass-addons/grass7/gui/wxpython/wx.wms/parse.py
===================================================================
--- grass-addons/grass7/gui/wxpython/wx.wms/parse.py	2011-08-03 16:33:44 UTC (rev 47381)
+++ grass-addons/grass7/gui/wxpython/wx.wms/parse.py	2011-08-03 16:34:53 UTC (rev 47382)
@@ -55,15 +55,16 @@
 	
 def dfs(root,LayerTree, ltr):
 	if not hasattr(root, 'contents'):
-		#print root.string
+		print root.string
 		return
 	else:
 		id = ltr
-		#print root.name
+		print root.name
 		if(root.name == 'layer'):
 			names = root.findAll('name')
-			id = LayerTree.AppendItem(ltr,names[0].string)
-			print  names[0].string
+			if(len(names)>0):
+				id = LayerTree.AppendItem(ltr,names[0].string)
+				print  names[0].string
 		children = root.contents
 		for child in children:
 			dfs(child, LayerTree, id)

Modified: grass-addons/grass7/gui/wxpython/wx.wms/wmsmenu.py
===================================================================
--- grass-addons/grass7/gui/wxpython/wx.wms/wmsmenu.py	2011-08-03 16:33:44 UTC (rev 47381)
+++ grass-addons/grass7/gui/wxpython/wx.wms/wmsmenu.py	2011-08-03 16:34:53 UTC (rev 47382)
@@ -8,7 +8,6 @@
 from parse import parsexml, isServiceException, populateLayerTree
 from WMSMapDisplay import NewImageFrame
 from addserver import AddServerFrame
-from passwordPopUp import PasswordPopUpFrame, check
 
 # begin wxGlade: extracode
 # end wxGlade
@@ -117,6 +116,9 @@
         try:
             response = urlopen(req)
             xml = response.read()
+            f=open('in1.xml','r')
+            xml=f.read()
+            f.close()
             #self.statusbar.SetStatusText(xml) 
             
             reslist = parsexml(xml)



More information about the grass-commit mailing list