Skip to content

Commit bd16318

Browse files
committed
Fixed filepath logic
1 parent e222420 commit bd16318

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

pixie/cli.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,14 +125,15 @@ def load_config(config_file):
125125
TranslationUnit(**tu)
126126
)
127127
elif 'path' in tu:
128-
file_type = tu.pop('path').split('.')[-1]
128+
file_path = tu.pop('path')
129+
file_type = file_path.split('.')[-1]
129130
if file_type == 'c':
130131
tranlastion_units.append(
131-
TranslationUnit.from_c_source(tu['path'], **tu)
132+
TranslationUnit.from_c_source(file_path, **tu)
132133
)
133134
elif file_type == 'pyx':
134135
tranlastion_units.append(
135-
TranslationUnit.from_cython_source(tu['path'], **tu)
136+
TranslationUnit.from_cython_source(file_path, **tu)
136137
)
137138
else:
138139
raise ValueError("Invalid file type provided in path")

0 commit comments

Comments
 (0)