Index: gclient.py |
diff --git a/gclient.py b/gclient.py |
index 3007487a5930d0f09aeac1260defe3be12bd4360..1cb36d72eb568e90f5a11763bd75d1dff56f392c 100755 |
--- a/gclient.py |
+++ b/gclient.py |
@@ -1265,12 +1265,16 @@ 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 |
- solutions = [elem for elem in a.body if 'solutions' in |
- [target.id for target in elem.targets]] |
+ |
+ solutions = [elem for elem in a.body if elem.__class__ is ast.Assign and |
+ 'solutions' in [target.id for target in elem.targets]] |
if not solutions: |
return self |
solutions = solutions[-1] |
for solution in solutions.value.elts: |
+ # Non-trivial assignment to solutions. |
+ if solution.__class__ is not ast.Dict: |
+ continue |
# Check for obsolete URL's |
url_idx = ast_dict_index(solution, 'url') |
if url_idx == -1: |