fetcher += birazcık exception handling..

This commit is contained in:
A. Murat Eren
2005-06-09 08:06:14 +00:00
parent 2a0d132f8c
commit f7530e8ca6
+6 -1
View File
@@ -50,7 +50,12 @@ class Fetcher:
copyfile(self.filepath, self.filedest + "/" + self.filename)
def fetchRemoteFile (self):
file = urllib.urlopen(self.uri)
try:
file = urllib.urlopen(self.uri)
except IOError, e:
self.err(e.strerror[1])
dest = open(self.filedest + "/" + self.filename , "w")
dest.write(file.read())