launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #27038
[Merge] ~cjwatson/launchpad:py3-execfile into launchpad:master
Colin Watson has proposed merging ~cjwatson/launchpad:py3-execfile into launchpad:master.
Commit message:
Avoid using execfile(), removed in Python 3
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/+git/launchpad/+merge/402638
--
Your team Launchpad code reviewers is requested to review the proposed merge of ~cjwatson/launchpad:py3-execfile into launchpad:master.
diff --git a/lib/lp/scripts/harness.py b/lib/lp/scripts/harness.py
index 7bfe67e..ab3a5c7 100644
--- a/lib/lp/scripts/harness.py
+++ b/lib/lp/scripts/harness.py
@@ -62,7 +62,8 @@ def _get_locals():
# $PYTHONSTARTUP file.
startup = os.environ.get('PYTHONSTARTUP')
if startup:
- execfile(startup)
+ with open(startup) as f:
+ exec(f.read())
store = IMasterStore(Person)
if dbuser == 'launchpad':