* Frank Hart <[EMAIL PROTECTED]> [2006-03-05 01:41]:
> I was using pyhton 2.3.5-3sarge1 and have now upgraded to 2.3-5-5.

I'll try that tomorrow or so and see whether there might be an
incompatibilty.

> But I found the problem: feeds.dat had become corrupted somehow.

Well, we could at least print a nicer error message, e.g. via the
patch below.  But let me check with a 2.3.5-3sarge1 -> 2.3.5-5.
upgrade first.


--- /usr/share/rss2email/rss2email.py~  2006-03-05 03:28:27.000000000 +0000
+++ /usr/share/rss2email/rss2email.py   2006-03-05 03:29:26.000000000 +0000
@@ -253,7 +253,11 @@
        except IOError, e:
                print "Feedfile could not be opened: %s" % e
                sys.exit(1)
-       feeds = pickle.load(feedfileObject)
+       try:
+               feeds = pickle.load(feedfileObject)
+       except EOFError:
+               print "Feedfile could not be opened: it appears to have been 
corrupted"
+               sys.exit(1)
        if lock:
                fcntl.flock(feedfileObject.fileno(), fcntl.LOCK_EX)
                #HACK: to deal with lock caching

-- 
Martin Michlmayr
http://www.cyrius.com/


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to