diff --git a/pixie/cli.py b/pixie/cli.py index 8c873f3..7e078d9 100644 --- a/pixie/cli.py +++ b/pixie/cli.py @@ -125,14 +125,15 @@ def load_config(config_file): TranslationUnit(**tu) ) elif 'path' in tu: - file_type = tu.pop('path').split('.')[-1] + file_path = tu.pop('path') + file_type = file_path.split('.')[-1] if file_type == 'c': tranlastion_units.append( - TranslationUnit.from_c_source(tu['path'], **tu) + TranslationUnit.from_c_source(file_path, **tu) ) elif file_type == 'pyx': tranlastion_units.append( - TranslationUnit.from_cython_source(tu['path'], **tu) + TranslationUnit.from_cython_source(file_path, **tu) ) else: raise ValueError("Invalid file type provided in path")