瀏覽代碼

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
Conley Owens 12 年之前
父節點
當前提交
a17d7af4d9
共有 1 個文件被更改,包括 3 次插入1 次删除
  1. 3 1
      manifest_xml.py

+ 3 - 1
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: