diff options
Diffstat (limited to 'manifest_xml.py')
-rw-r--r-- | manifest_xml.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/manifest_xml.py b/manifest_xml.py index 30e96584..09cae6f5 100644 --- a/manifest_xml.py +++ b/manifest_xml.py | |||
@@ -122,9 +122,13 @@ class _Default(object): | |||
122 | sync_tags = True | 122 | sync_tags = True |
123 | 123 | ||
124 | def __eq__(self, other): | 124 | def __eq__(self, other): |
125 | if not isinstance(other, _Default): | ||
126 | return False | ||
125 | return self.__dict__ == other.__dict__ | 127 | return self.__dict__ == other.__dict__ |
126 | 128 | ||
127 | def __ne__(self, other): | 129 | def __ne__(self, other): |
130 | if not isinstance(other, _Default): | ||
131 | return True | ||
128 | return self.__dict__ != other.__dict__ | 132 | return self.__dict__ != other.__dict__ |
129 | 133 | ||
130 | 134 | ||
@@ -147,12 +151,18 @@ class _XmlRemote(object): | |||
147 | self.resolvedFetchUrl = self._resolveFetchUrl() | 151 | self.resolvedFetchUrl = self._resolveFetchUrl() |
148 | 152 | ||
149 | def __eq__(self, other): | 153 | def __eq__(self, other): |
154 | if not isinstance(other, _XmlRemote): | ||
155 | return False | ||
150 | return self.__dict__ == other.__dict__ | 156 | return self.__dict__ == other.__dict__ |
151 | 157 | ||
152 | def __ne__(self, other): | 158 | def __ne__(self, other): |
159 | if not isinstance(other, _XmlRemote): | ||
160 | return True | ||
153 | return self.__dict__ != other.__dict__ | 161 | return self.__dict__ != other.__dict__ |
154 | 162 | ||
155 | def _resolveFetchUrl(self): | 163 | def _resolveFetchUrl(self): |
164 | if self.fetchUrl is None: | ||
165 | return '' | ||
156 | url = self.fetchUrl.rstrip('/') | 166 | url = self.fetchUrl.rstrip('/') |
157 | manifestUrl = self.manifestUrl.rstrip('/') | 167 | manifestUrl = self.manifestUrl.rstrip('/') |
158 | # urljoin will gets confused over quite a few things. The ones we care | 168 | # urljoin will gets confused over quite a few things. The ones we care |