Fix common exception in Atom reader, add stack trace in this module
This commit is contained in:
parent
4f0744ab24
commit
c42dfbe800
2 changed files with 8 additions and 5 deletions
6
atom.py
6
atom.py
|
|
@ -53,7 +53,7 @@ class Atom:
|
|||
differ = list ()
|
||||
for k in other.entries.keys ():
|
||||
if self.updated is None and k not in self.entries:
|
||||
self.updated = entry.updated
|
||||
self.updated = other.entries[k].updated
|
||||
if k not in self.entries and other.entries[k].updated >= self.updated:
|
||||
differ.append (other.entries[k])
|
||||
return differ
|
||||
|
|
@ -61,11 +61,11 @@ class Atom:
|
|||
|
||||
if __name__ == "__main__":
|
||||
content1 = ""
|
||||
with open("rss.php", "r") as f:
|
||||
with open("rss.php.1", "r") as f:
|
||||
for line in f:
|
||||
content1 += line
|
||||
content2 = ""
|
||||
with open("rss.php.1", "r") as f:
|
||||
with open("rss.php", "r") as f:
|
||||
for line in f:
|
||||
content2 += line
|
||||
a = Atom (content1)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue