mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-03-13 08:01:09 +00:00
Fix some errors found by pylint.
This commit is contained in:
parent
425b9da534
commit
2e9a5c3db6
6
dgetlp
6
dgetlp
@ -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)
|
||||
|
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user