Permalink
Browse files

Only modify sys.path in Renderer.__init__ if path isn't in there already

  • Loading branch information...
1 parent b1bcd27 commit 2f894110b6636f950b2cc153f249435bfdeae19c @benhoyt committed Oct 4, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 symplate.py
View
@@ -91,7 +91,8 @@ def __init__(self, template_dir, output_dir=None, extension='.symp',
self._module_cache = {}
if modify_path:
path_dir = os.path.abspath(os.path.join(output_dir, '..'))
- sys.path.insert(0, path_dir)
+ if path_dir not in sys.path:
+ sys.path.insert(0, path_dir)
def _get_default_filter(self, filename):
"""Return Python expression string to use as default filter."""

0 comments on commit 2f89411

Please sign in to comment.