Fix #376: Execfile does not exist in python 3 (#377)

* Add execfile function since it's missing in python 3.

* Remove extra space.
This commit is contained in:
Jacob Bom 2016-08-10 21:39:14 +02:00 committed by Jannes Höke
parent dd4c0f0f1d
commit bd3fa3bb64

View file

@ -16,6 +16,13 @@ def requirements():
return requirements_list
def execfile(fn):
with open(fn) as f:
code = compile(f.read(), fn, 'exec')
exec(code)
with codecs.open('README.rst', 'r', 'utf-8') as fd:
execfile(os.path.join('telegram', 'version.py'))