Просмотр исходного кода

Treat missing attributes as None when parsing the manifest

Some of our code assumes that a property is None.

Signed-off-by: Shawn O. Pearce <sop@google.com>
Shawn O. Pearce 17 лет назад
Родитель
Сommit
5d40e26201
1 измененных файлов с 2 добавлено и 0 удалено
  1. 2 0
      manifest.py

+ 2 - 0
manifest.py

@@ -241,6 +241,8 @@ class Manifest(object):
     d = _Default()
     d.remote = self._get_remote(node)
     d.revision = node.getAttribute('revision')
+    if d.revision == '':
+      d.revision = None
     return d
 
   def _ParseProject(self, node):