From a17d7af4d9dd9165935a26a9971faed2c05bc278 Mon Sep 17 00:00:00 2001 From: Conley Owens Date: Wed, 16 Oct 2013 14:38:09 -0700 Subject: [PATCH] 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 --- manifest_xml.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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): e.setAttribute('name', name) if relpath != name: e.setAttribute('path', relpath) - remoteName = d.remote.remoteAlias or d.remote.name + remoteName = None + if d.remote: + remoteName = d.remote.remoteAlias or d.remote.name if not d.remote or p.remote.name != remoteName: e.setAttribute('remote', p.remote.name) if peg_rev: