From 99b8a066c8e7050f6b100650922e400dcdba6787 Mon Sep 17 00:00:00 2001 From: Daniel Wagner-Hall Date: Mon, 7 Dec 2015 14:40:42 +0000 Subject: [PATCH] Make dump-swagger work from all directories --- scripts/dump-swagger.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/dump-swagger.py b/scripts/dump-swagger.py index 7b111502..22e4e10d 100755 --- a/scripts/dump-swagger.py +++ b/scripts/dump-swagger.py @@ -12,7 +12,10 @@ import re import shutil import sys -sys.path.insert(0, os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), "templating")) +templating_dir = os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), "templating") +sys.path.insert(0, templating_dir) +os.chdir(templating_dir) + from matrix_templates.units import resolve_references, MatrixUnits if len(sys.argv) < 2 or len(sys.argv) > 3: