Revision: 4280
Author: pekka.klarck
Date: Thu Nov 11 08:25:29 2010
Log: cleanup
http://code.google.com/p/robotframework/source/detail?r=4280

Modified:
 /trunk/src/robot/utils/domwrapper.py

=======================================
--- /trunk/src/robot/utils/domwrapper.py        Mon Aug 23 08:44:42 2010
+++ /trunk/src/robot/utils/domwrapper.py        Thu Nov 11 08:25:29 2010
@@ -53,10 +53,7 @@
             return node
# Cannot give path to ET.parse because it doesn't close files it opens
         # http://bugs.jython.org/issue1598
-        if path:
-            source = open(path, 'rb')
-        else:
-            source = StringIO(string)
+        source = open(path, 'rb') if path else StringIO(string)
         try:
             return ET.parse(source).getroot()
         finally:

Reply via email to