diff --git a/dgetlp b/dgetlp index e2d3b0a..ce51086 100755 --- a/dgetlp +++ b/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) diff --git a/pbuilder-dist b/pbuilder-dist index e4596a6..5af798b 100755 --- a/pbuilder-dist +++ b/pbuilder-dist @@ -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)