Author: ai0867
Date: Fri Nov 11 16:49:29 2011
New Revision: 51953

URL: http://svn.gna.org/viewcvs/wesnoth?rev=51953&view=rev
Log:
Ignore warnings about empty repositories

Modified:
    trunk/data/tools/wesnoth/libgithub.py

Modified: trunk/data/tools/wesnoth/libgithub.py
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/data/tools/wesnoth/libgithub.py?rev=51953&r1=51952&r2=51953&view=diff
==============================================================================
--- trunk/data/tools/wesnoth/libgithub.py (original)
+++ trunk/data/tools/wesnoth/libgithub.py Fri Nov 11 16:49:29 2011
@@ -197,7 +197,18 @@
 
     def _clone(self, name, url):
         target = self._absolute_path(name)
-        self._execute(["git", "clone", url, target], check_error=True)
+        out, err = self._execute(["git", "clone", url, target])
+
+        # Rather hacky
+        if len(err):
+            errors = [line.strip() for line in err.split('\n') if len(line)]
+            got_error = False
+            for error in errors:
+                if error != "warning: You appear to have cloned an empty 
repository.":
+                    got_error = True
+                    break
+            if got_error:
+                raise Error("Error cloning an add-on: " + err)
 
     def _get_new_addons(self):
         """Check out any new add-ons.


_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits

Reply via email to