diff options
author | Conley Owens <cco3@android.com> | 2013-10-16 14:38:09 -0700 |
---|---|---|
committer | Conley Owens <cco3@android.com> | 2013-10-16 14:38:09 -0700 |
commit | a17d7af4d9dd9165935a26a9971faed2c05bc278 (patch) | |
tree | 0ce989ff6a876bf78100f00bbf0ed9d6f1e1830e | |
parent | 37128b6f709410763f85d112a1a3e6f9e42e1338 (diff) | |
download | git-repo-a17d7af4d9dd9165935a26a9971faed2c05bc278.tar.gz |
Dan't accessing attr of None (`manifest` subcmd)
If d.remote is None, this code failed for obvious reasons. This is a
simple fix.
Change-Id: I413756121e444111f1e3c7dc8bc8032467946c13
-rw-r--r-- | manifest_xml.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/manifest_xml.py b/manifest_xml.py index b3ab098d..f1d3edaa 100644 --- a/manifest_xml.py +++ b/manifest_xml.py | |||
@@ -233,7 +233,9 @@ class XmlManifest(object): | |||
233 | e.setAttribute('name', name) | 233 | e.setAttribute('name', name) |
234 | if relpath != name: | 234 | if relpath != name: |
235 | e.setAttribute('path', relpath) | 235 | e.setAttribute('path', relpath) |
236 | remoteName = d.remote.remoteAlias or d.remote.name | 236 | remoteName = None |
237 | if d.remote: | ||
238 | remoteName = d.remote.remoteAlias or d.remote.name | ||
237 | if not d.remote or p.remote.name != remoteName: | 239 | if not d.remote or p.remote.name != remoteName: |
238 | e.setAttribute('remote', p.remote.name) | 240 | e.setAttribute('remote', p.remote.name) |
239 | if peg_rev: | 241 | if peg_rev: |