Fix run.py version control detection when used outide of OpenCV build
authorAndrey Kamaev <andrey.kamaev@itseez.com>
Wed, 29 Aug 2012 15:16:11 +0000 (19:16 +0400)
committerAndrey Kamaev <andrey.kamaev@itseez.com>
Wed, 29 Aug 2012 15:17:18 +0000 (19:17 +0400)
modules/ts/misc/run.py

index f2c213e..09db7dc 100644 (file)
@@ -339,6 +339,8 @@ class RunInfo(object):
         self.tests = self.getAvailableTestApps()
 
     def getVCVersion(self, root_path):
+        if not root_path:
+            return None
         if os.path.isdir(os.path.join(root_path, ".svn")):
             return self.getSvnVersion(root_path)
         elif os.path.isdir(os.path.join(root_path, ".git")):