1. Augie Fackler
  2. blatter


Steve Losh  committed a4d2f0c

Add any directories that a blatter config file is in to the Python path.

This makes sense because configs should be able to specify filter modules
relative to their own paths.

  • Participants
  • Parent commits f3cd950
  • Branches default

Comments (0)

Files changed (1)

File blatter/__init__.py

View file
  • Ignore whitespace
 config_names = os.environ.get('BLATTER_CONFIG', 'blatter.ini, local.ini')
 config_files = [fn.strip() for fn in config_names.split(',')]
 del config_names
+for config_file in config_files:
+    p = os.path.dirname(os.path.abspath(config_file))
+    if p not in sys.path:
+        sys.path.append(p)