launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #25184
[Merge] ~cjwatson/launchpad:py3-exception-types into launchpad:master
Colin Watson has proposed merging ~cjwatson/launchpad:py3-exception-types into launchpad:master.
Commit message:
Handle some changes in Python 3's exception hierarchy
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/+git/launchpad/+merge/389445
--
Your team Launchpad code reviewers is requested to review the proposed merge of ~cjwatson/launchpad:py3-exception-types into launchpad:master.
diff --git a/lib/lp/codehosting/puller/scheduler.py b/lib/lp/codehosting/puller/scheduler.py
index 35dd65b..2b47363 100644
--- a/lib/lp/codehosting/puller/scheduler.py
+++ b/lib/lp/codehosting/puller/scheduler.py
@@ -459,10 +459,10 @@ class JobScheduler:
completed_tuple)
-class LockError(StandardError):
+class LockError(Exception):
def __init__(self, lockfilename):
- StandardError.__init__(self)
+ super(LockError, self).__init__()
self.lockfilename = lockfilename
def __str__(self):
diff --git a/lib/lp/soyuz/adapters/archivedependencies.py b/lib/lp/soyuz/adapters/archivedependencies.py
index f81079d..d3cbff3 100644
--- a/lib/lp/soyuz/adapters/archivedependencies.py
+++ b/lib/lp/soyuz/adapters/archivedependencies.py
@@ -295,7 +295,7 @@ def get_sources_list_for_building(build, distroarchseries, sourcepackagename,
line = archive_dep % (
{'series': distroarchseries.distroseries.name})
external_dep_lines.append(line)
- except StandardError:
+ except Exception:
# Malformed external dependencies can incapacitate the build farm
# manager (lp:516169). That's obviously not acceptable.
# Log the error, and disable the PPA.
diff --git a/lib/lp/soyuz/tests/test_build.py b/lib/lp/soyuz/tests/test_build.py
index cf0863f..734ddce 100644
--- a/lib/lp/soyuz/tests/test_build.py
+++ b/lib/lp/soyuz/tests/test_build.py
@@ -9,7 +9,6 @@ from datetime import (
datetime,
timedelta,
)
-from exceptions import AssertionError
import pytz
import transaction