Index: gclient.py |
diff --git a/gclient.py b/gclient.py |
index 3007487a5930d0f09aeac1260defe3be12bd4360..0d525c9921522b494d205cedcdb98c802c0c0870 100755 |
--- a/gclient.py |
+++ b/gclient.py |
@@ -1265,6 +1265,12 @@ want to set 'managed': False in .gclient. |
# dump an updated .gclient file that preserves the ordering of the original. |
a = ast.parse(self.config_content, options.config_filename, 'exec') |
modified = False |
+ |
+ # If non trivial gclient (e.g. includes an Import directive), skip this |
+ # migration since it would crash either way. |
+ if any(not hasattr(elem, 'targets') for elem in a.body): |
szager1
2014/08/28 17:22:15
Instead of this, I would prefer you modify the nex
|
+ return self |
+ |
solutions = [elem for elem in a.body if 'solutions' in |
[target.id for target in elem.targets]] |
if not solutions: |