[py-svn] r35151 - in py/dist/py/test/rsession: . webdata

fijal at codespeak.net fijal at codespeak.net
Thu Nov 30 11:22:40 CET 2006


Author: fijal
Date: Thu Nov 30 11:22:34 2006
New Revision: 35151

Modified:
   py/dist/py/test/rsession/hostmanage.py
   py/dist/py/test/rsession/webdata/source.js
   py/dist/py/test/rsession/webjs.py
Log:
Strange python semantics...


Modified: py/dist/py/test/rsession/hostmanage.py
==============================================================================
--- py/dist/py/test/rsession/hostmanage.py	(original)
+++ py/dist/py/test/rsession/hostmanage.py	Thu Nov 30 11:22:34 2006
@@ -84,7 +84,7 @@
             and optimise_localhost):
             continue
         rsynced[(host, remoterootpath)] = True
-        def done(host=host):
+        def done(host=host, num=num):
             key = host + str(num)
             reporter(report.HostReady(host, key))
         reporter(report.HostRSyncing(host, remoterootpath))

Modified: py/dist/py/test/rsession/webdata/source.js
==============================================================================
Binary files. No diff available.

Modified: py/dist/py/test/rsession/webjs.py
==============================================================================
--- py/dist/py/test/rsession/webjs.py	(original)
+++ py/dist/py/test/rsession/webjs.py	Thu Nov 30 11:22:34 2006
@@ -107,7 +107,14 @@
             if not module_part:
                 glob.pending.append(msg)
                 return True
-            
+
+            if msg['hostkey']:
+                host_elem = dom.get_document().getElementById(msg['hostkey'])
+                glob.host_pending[msg['hostkey']].pop()
+                count = len(glob.host_pending[msg['hostkey']])
+                host_elem.childNodes[0].nodeValue = glob.host_dict[msg['hostkey']] + '[' +\
+                   str(count) + ']'
+                    
             td = create_elem("td")
             td.setAttribute("onmouseover", "show_info('%s')" % (
                                                     msg['fullitemname'],))
@@ -144,14 +151,7 @@
             counter_part.childNodes[0].nodeValue = "%s[%d/%d]" % (
                     short_item_names[name], counters[name], max_items[name])
             module_part.childNodes[-1].appendChild(td)
-            
-            if msg['hostkey']:
-                host_elem = dom.get_document().getElementById(msg['hostkey'])
-                glob.host_pending[msg['hostkey']].pop()
-                count = len(glob.host_pending[msg['hostkey']])
-                host_elem.childNodes[0].nodeValue = glob.host_dict[msg['hostkey']] + '[' +\
-                    str(count) + ']'
-        
+
         except:
             dom.get_document().getElementById("testmain").innerHTML += \
                                                     "some error"



More information about the pytest-commit mailing list