diff options
author | Jeremy Heiner <scalaprotractor@gmail.com> | 2013-10-12 18:44:31 +0200 |
---|---|---|
committer | Allan McRae <allan@archlinux.org> | 2013-10-14 05:01:15 +0200 |
commit | 4d24da8cda18cdb1e7a69baec196ad502d4d12de (patch) | |
tree | 40e4f70d136bac06484bcfa0d1deb3430d6abff6 | |
parent | 372e26118f298f38b45c244fdb77785245ceefca (diff) | |
download | pacman-4d24da8cda18cdb1e7a69baec196ad502d4d12de.tar.gz pacman-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>
-rw-r--r-- | test/pacman/pmtest.py | 3 |
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) |