qtcreator/netbeans generators: fix for error getting project info when svn isnt found...
authorCampbell Barton <ideasman42@gmail.com>
Sun, 15 Apr 2012 09:34:57 +0000 (09:34 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Sun, 15 Apr 2012 09:34:57 +0000 (09:34 +0000)
build_files/cmake/project_info.py

index 77574f17e2e4f336fde3c262d0fcffd4a8a4ea39..3f64ac51a4d374a29a6294fd0b786e4d5469af63 100755 (executable)
@@ -231,8 +231,13 @@ def project_name_get(path, fallback="Blender", prefix="Blender_"):
         return fallback
 
     import subprocess
-    info = subprocess.Popen(["svn", "info", path],
-                            stdout=subprocess.PIPE).communicate()[0]
+    try:
+        info = subprocess.Popen(["svn", "info", path],
+                                stdout=subprocess.PIPE).communicate()[0]
+    except:
+        # possibly 'svn' isnt found/installed
+        return fallback
+
     # string version, we only want the URL
     info = info.decode(encoding="utf-8", errors="ignore")