1
0
mirror of https://github.com/moparisthebest/pacman synced 2024-08-13 17:03:46 -04:00

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>
This commit is contained in:
Jeremy Heiner 2013-10-12 12:44:31 -04:00 committed by Allan McRae
parent 372e26118f
commit 4d24da8cda

View File

@ -100,7 +100,8 @@ class pmtest(object):
if os.path.isfile(self.name): if os.path.isfile(self.name):
# all tests expect this to be available # all tests expect this to be available
from pmpkg import pmpkg from pmpkg import pmpkg
execfile(self.name) with open(self.name) as input:
exec(input.read(),locals())
else: else:
raise IOError("file %s does not exist!" % self.name) raise IOError("file %s does not exist!" % self.name)