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 e40e6fac..eb4908da 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, |
| @@ -422,11 +428,14 @@ class XmlManifest(object): | |||
| 422 | 428 | ||
| 423 | for node in itertools.chain(*node_list): | 429 | for node in itertools.chain(*node_list): |
| 424 | if node.nodeName == 'default': | 430 | if node.nodeName == 'default': |
| 425 | if self._default is not None: | 431 | new_default = self._ParseDefault(node) |
| 426 | raise ManifestParseError( | 432 | if self._default is None: |
| 427 | 'duplicate default in %s' % | 433 | self._default = new_default |
| 428 | (self.manifestFile)) | 434 | elif new_default != self._default: |
| 429 | self._default = self._ParseDefault(node) | 435 | raise ManifestParseError( |
| 436 | 'duplicate default in %s' % | ||
| 437 | (self.manifestFile)) | ||
| 438 | |||
| 430 | if self._default is None: | 439 | if self._default is None: |
| 431 | self._default = _Default() | 440 | self._default = _Default() |
| 432 | 441 | ||
