Skip to content

Commit

Permalink
Fixed filepath logic
Browse files Browse the repository at this point in the history
  • Loading branch information
kc611 committed Jul 2, 2024
1 parent e222420 commit bd16318
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions pixie/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit bd16318

Please sign in to comment.