Skip to content

Commit bd3fa3b

Browse files
jsmnbomjh0ker
authored andcommitted
Fix python-telegram-bot#376: Execfile does not exist in python 3 (python-telegram-bot#377)
* Add execfile function since it's missing in python 3. * Remove extra space.
1 parent dd4c0f0 commit bd3fa3b

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

setup.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,13 @@ def requirements():
1616

1717
return requirements_list
1818

19+
20+
def execfile(fn):
21+
with open(fn) as f:
22+
code = compile(f.read(), fn, 'exec')
23+
exec(code)
24+
25+
1926
with codecs.open('README.rst', 'r', 'utf-8') as fd:
2027
execfile(os.path.join('telegram', 'version.py'))
2128

0 commit comments

Comments
 (0)