Revision: 2083
Author: pekka.klarck
Date: Wed Jul 29 02:29:22 2009
Log: Fixed executing directory containing no test cases (issue 312)
http://code.google.com/p/robotframework/source/detail?r=2083

Modified:
 /trunk/src/robot/parsing/model.py

=======================================
--- /trunk/src/robot/parsing/model.py   Tue Jul 28 00:37:41 2009
+++ /trunk/src/robot/parsing/model.py   Wed Jul 29 02:29:22 2009
@@ -76,7 +76,8 @@
         # The latter check is to get a more informative exception in
         # suite.filter_by_names later if --suite option was used.
         if self.get_test_count() == 0 and len(suitenames) == 0:
-            self.parent.suites.pop()
+            if self.parent is not None:
+                self.parent.suites.pop()
             raise DataError(error)


Reply via email to