[jhbuild] Raise UsageError on circular dependencies if testing (GNOME bug 669554)



commit 2b2ebe488ea5c0ccb9d9dfc9059a35e00eef0a06
Author: Craig Keogh <cskeogh adam com au>
Date:   Fri May 18 20:41:55 2012 +0930

    Raise UsageError on circular dependencies if testing (GNOME bug 669554)

 jhbuild/moduleset.py |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/jhbuild/moduleset.py b/jhbuild/moduleset.py
index 30a8f12..0ced9b7 100644
--- a/jhbuild/moduleset.py
+++ b/jhbuild/moduleset.py
@@ -121,6 +121,10 @@ class ModuleSet:
                     if edge in seen:
                         # circular dependency detected
                         circular = True
+                        if self.raise_exception_on_warning:
+                            # Translation of string not required - used in
+                            # unit tests only
+                            raise UsageError('Circular dependencies detected')
                         break
                     else:
                         if edge_name in node.after:



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]