Ensure the working directory is unaltered after generating docs

This commit is contained in:
Lonami Exo 2017-09-23 21:02:32 +02:00
parent 40d80f73ee
commit d5ba259d4e

View File

@ -563,5 +563,8 @@ def copy_resources():
if __name__ == '__main__': if __name__ == '__main__':
os.makedirs('generated', exist_ok=True) os.makedirs('generated', exist_ok=True)
os.chdir('generated') os.chdir('generated')
try:
generate_documentation('../../telethon_generator/scheme.tl') generate_documentation('../../telethon_generator/scheme.tl')
copy_resources() copy_resources()
finally:
os.chdir(os.pardir)