changeset 13:36576b1ce54e

try/except EOFError
author Walter Cruz <walter@waltercruz.com>
date Tue, 15 Jul 2008 16:13:38 -0300
parents d9059bb42807
children 5a635718793a
files feed2twitter/feed2twitter/readrss.py
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/feed2twitter/feed2twitter/readrss.py	Wed Jul 09 16:18:05 2008 -0300
+++ b/feed2twitter/feed2twitter/readrss.py	Tue Jul 15 16:13:38 2008 -0300
@@ -47,7 +47,10 @@
             pick = open(self.filename, 'rb')
         except IOError:
             return False
-        last_read = pickle.load(pick)
+        try:
+            last_read = pickle.load(pick)
+        except EOFError:
+            return False
         return last_read