Skip to content

Commit

Permalink
Merge pull request #1086 from CouncilRockProducts/load-pyc
Browse files Browse the repository at this point in the history
Load .pyc modules
  • Loading branch information
imbeacon authored Apr 8, 2023
2 parents d58423a + 4d91f03 commit bede5b7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion thingsboard_gateway/tb_utility/tb_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def import_module(extension_type, module_name):
current_extension_path = current_path + path.sep + extension_type
if path.exists(current_extension_path):
for file in listdir(current_extension_path):
if not file.startswith('__') and file.endswith('.py'):
if not file.startswith('__') and (file.endswith('.py') or file.endswith('.pyc')):
try:
module_spec = spec_from_file_location(module_name, current_extension_path + path.sep + file)
log.debug(module_spec)
Expand Down

0 comments on commit bede5b7

Please sign in to comment.