summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJeremy Heiner <scalaprotractor@gmail.com>2013-10-12 12:44:31 -0400
committerAllan McRae <allan@archlinux.org>2013-10-14 13:01:15 +1000
commit4d24da8cda18cdb1e7a69baec196ad502d4d12de (patch)
tree40e4f70d136bac06484bcfa0d1deb3430d6abff6 /test
parent372e26118f298f38b45c244fdb77785245ceefca (diff)
downloadpacman-4d24da8cda18cdb1e7a69baec196ad502d4d12de.tar.xz
Use "exec" instead of "execfile" (deprecated in Python 3).
This was the only compatibility issue reported by "python2 -3". Signed-off-by: Jeremy Heiner <ScalaProtractor at gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'test')
-rw-r--r--test/pacman/pmtest.py3
1 files changed, 2 insertions, 1 deletions
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)