diff options
Diffstat (limited to 'manifest_xml.py')
| -rw-r--r-- | manifest_xml.py | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/manifest_xml.py b/manifest_xml.py index bdbb1d40..c5e2e345 100644 --- a/manifest_xml.py +++ b/manifest_xml.py | |||
| @@ -51,6 +51,12 @@ class _Default(object): | |||
| 51 | sync_c = False | 51 | sync_c = False |
| 52 | sync_s = False | 52 | sync_s = False |
| 53 | 53 | ||
| 54 | def __eq__(self, other): | ||
| 55 | return self.__dict__ == other.__dict__ | ||
| 56 | |||
| 57 | def __ne__(self, other): | ||
| 58 | return self.__dict__ != other.__dict__ | ||
| 59 | |||
| 54 | class _XmlRemote(object): | 60 | class _XmlRemote(object): |
| 55 | def __init__(self, | 61 | def __init__(self, |
| 56 | name, | 62 | name, |
| @@ -427,11 +433,14 @@ class XmlManifest(object): | |||
| 427 | 433 | ||
| 428 | for node in itertools.chain(*node_list): | 434 | for node in itertools.chain(*node_list): |
| 429 | if node.nodeName == 'default': | 435 | if node.nodeName == 'default': |
| 430 | if self._default is not None: | 436 | new_default = self._ParseDefault(node) |
| 431 | raise ManifestParseError( | 437 | if self._default is None: |
| 432 | 'duplicate default in %s' % | 438 | self._default = new_default |
| 433 | (self.manifestFile)) | 439 | elif new_default != self._default: |
| 434 | self._default = self._ParseDefault(node) | 440 | raise ManifestParseError( |
| 441 | 'duplicate default in %s' % | ||
| 442 | (self.manifestFile)) | ||
| 443 | |||
| 435 | if self._default is None: | 444 | if self._default is None: |
| 436 | self._default = _Default() | 445 | self._default = _Default() |
| 437 | 446 | ||
