From 4d24da8cda18cdb1e7a69baec196ad502d4d12de Mon Sep 17 00:00:00 2001 From: Jeremy Heiner Date: Sat, 12 Oct 2013 12:44:31 -0400 Subject: Use "exec" instead of "execfile" (deprecated in Python 3). This was the only compatibility issue reported by "python2 -3". Signed-off-by: Jeremy Heiner Signed-off-by: Allan McRae --- test/pacman/pmtest.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'test') diff --git a/test/pacman/pmtest.py b/test/pacman/pmtest.py index b343d55f..d12a5ed2 100644 --- a/test/pacman/pmtest.py +++ b/test/pacman/pmtest.py @@ -100,7 +100,8 @@ class pmtest(object): if os.path.isfile(self.name): # all tests expect this to be available from pmpkg import pmpkg - execfile(self.name) + with open(self.name) as input: + exec(input.read(),locals()) else: raise IOError("file %s does not exist!" % self.name) -- cgit v1.2.3-70-g09d2