diff options
author | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2012-08-21 09:08:57 -0400 |
---|---|---|
committer | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2012-08-21 13:33:20 -0400 |
commit | d6bf20100848dc61b971844e21d24da44b9f65f7 (patch) | |
tree | cdbdd5d4181c3519e2a4ddabd815cdfb8cbca631 /setup.py | |
parent | 6b70e18c5f4c4405299e54db7fa80e93dab81f0b (diff) | |
download | bcfg2-d6bf20100848dc61b971844e21d24da44b9f65f7.tar.gz bcfg2-d6bf20100848dc61b971844e21d24da44b9f65f7.tar.bz2 bcfg2-d6bf20100848dc61b971844e21d24da44b9f65f7.zip |
fixed setup.py execfile() call for py3k
Diffstat (limited to 'setup.py')
-rwxr-xr-x | setup.py | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -8,7 +8,13 @@ import os import os.path import sys -execfile('src/lib/Bcfg2/version.py') +vfile = 'src/lib/Bcfg2/version.py' +try: + # python 2 + execfile(vfile) +except NameError: + # py3k + exec(compile(open(vfile).read(), vfile, 'exec')) # we only need m2crypto on < python2.6 need_m2crypto = False |