I think this is fixed in the attached branch:
------------------------------------------------------------
revno: 33
committer: Markus Korn <email address hidden>
branch nick: fix.264098.eq.ne
timestamp: Fri 2009-01-16 20:41:57 +0100
message:
* launchpadlib/resource.py: changed order of checks in HostedFile.__eq__(),
this avoids calling open() for this resource of this does not look like a
file and does not have the same url.
------------------------------------------------------------
revno: 32
committer: Markus Korn <email address hidden>
branch nick: fix.264098.eq.ne
timestamp: Fri 2009-01-16 20:29:20 +0100
message:
* launchpadlib/resource.py: Implemented __eq__ and __ne__ for Ressources,
Collections and HostedFiles, with following rules:
- two ressources are equal if the values of their 'self_link' and
'http_etag' attributes are equal
- two collections are equal if the value of their 'self_link' attributes
are equal
- two hosted files are equal if the values of their 'url' and 'last_modified' attributes are equal
- __ne__ always returns always the revers of __eq__
- __eq__ always returns False if any error occurs
I think this is fixed in the attached branch: ------- ------- ------- ------- ------- ------- ------- ---- resource. py: changed order of checks in HostedFile. __eq__( ), ------- ------- ------- ------- ------- ------- ------- ---- resource. py: Implemented __eq__ and __ne__ for Ressources,
'last_modified' attributes are equal
-------
revno: 33
committer: Markus Korn <email address hidden>
branch nick: fix.264098.eq.ne
timestamp: Fri 2009-01-16 20:41:57 +0100
message:
* launchpadlib/
this avoids calling open() for this resource of this does not look like a
file and does not have the same url.
-------
revno: 32
committer: Markus Korn <email address hidden>
branch nick: fix.264098.eq.ne
timestamp: Fri 2009-01-16 20:29:20 +0100
message:
* launchpadlib/
Collections and HostedFiles, with following rules:
- two ressources are equal if the values of their 'self_link' and
'http_etag' attributes are equal
- two collections are equal if the value of their 'self_link' attributes
are equal
- two hosted files are equal if the values of their 'url' and
- __ne__ always returns always the revers of __eq__
- __eq__ always returns False if any error occurs