Author: duncan
Date: Sun Jan 14 14:39:29 2007
New Revision: 8981
Modified:
branches/rel-1/freevo/src/rssperiodic.py
Log:
[ 1635088 ] RSSServer reports wrong errors
Patch from Frank Naude applied
Modified: branches/rel-1/freevo/src/rssperiodic.py
==============================================================================
--- branches/rel-1/freevo/src/rssperiodic.py (original)
+++ branches/rel-1/freevo/src/rssperiodic.py Sun Jan 14 14:39:29 2007
@@ -113,21 +113,26 @@
file.write('</freevo>\n')
file.close()
except IOError:
- print "ERROR: Could not open %s"%(ofile)
+ print "ERROR: Unable to write FXD file %s"%(ofile)
def checkForUpdates():
try:
file = open(config.RSS_FEEDS,"r")
- for line in file:
- if line == '\n':
- continue
- if re.search("^#",line):
- continue
- try:
- (url,numberOfDays)=re.split(",", line)
- except ValueError:
- continue
- print "Check %s for updates" % url
+ except IOError:
+ print "ERROR: Could not open configuration file %s"%(config.RSS_FEEDS)
+ return
+
+ for line in file:
+ if line == '\n':
+ continue
+ if re.search("^#",line):
+ continue
+ try:
+ (url,numberOfDays)=re.split(",", line)
+ except ValueError:
+ continue
+ print "Check %s for updates" % url
+ try:
sock = urllib.urlopen(url)
feedSource = sock.read()
sock.close()
@@ -154,6 +159,6 @@
else:
print "Download failed - exit status %s." %
exitStatus
os.popen("rm %s" %(filename))
- except IOError:
- print "ERROR: Could not open %s"%(config.RSS_FEEDS)
+ except IOError:
+ print "ERROR: Unable to download %s. Connection may be down."%(url)
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog