Fix some errors found by pylint.

This commit is contained in:
Benjamin Drung 2010-12-26 01:01:57 +01:00
parent 425b9da534
commit 2e9a5c3db6
2 changed files with 5 additions and 5 deletions

6
dgetlp
View File

@ -210,12 +210,12 @@ def Download(dscinfo, number, filename, verify=True):
outfd.write(fd.read())
fd.close()
outfd.close()
except urllib2.URLError, e:
status("Failed to fetch «%s» file, aborting.", ftype)
error(105, "Error: %s", e)
except urllib2.HTTPError, e:
status("Failed to fetch «%s» file, aborting.", ftype)
error(106, "Error: (%d %s)", e.code, e.msg)
except urllib2.URLError, e:
status("Failed to fetch «%s» file, aborting.", ftype)
error(105, "Error: %s", e)
except IOError, e:
status('Could not create "%s"', filename)
error(107, "Error: %s", e)

View File

@ -100,7 +100,7 @@ class pbuilder_dist:
if not os.path.isdir(self.base):
try:
os.makedirs(self.base)
except os.OSError:
except OSError:
print >> stderr, ('Error: Cannot create base directory "%s"'
% self.base)
exit(1)
@ -200,7 +200,7 @@ class pbuilder_dist:
if not os.path.isdir(result):
try:
os.makedirs(result)
except os.OSError:
except OSError:
print >> stderr, ('Error: Cannot create results directory "%s"'
% result)
exit(1)