Skip to content

Commit

Permalink
fix: remove not used func and consts
Browse files Browse the repository at this point in the history
  • Loading branch information
Tamir David authored and Tamir David committed Sep 10, 2024
1 parent 60e68d9 commit f016538
Showing 1 changed file with 0 additions and 19 deletions.
19 changes: 0 additions & 19 deletions initializer/lib_handling.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
import sys
import os
import importlib.util

# Constants
ODIGOS_PROTOBUF_PATH = '/var/odigos/python/google/protobuf'

def reorder_python_path():
paths_to_move = [path for path in sys.path if path.startswith('/var/odigos/')]
Expand Down Expand Up @@ -44,17 +39,3 @@ def reload_distro_modules() -> None:

if any(module.startswith(prefix) for prefix in needed_module_prefixes):
del sys.modules[module]


def import_module_from_path(unique_name, path):
''' Import a module from a file path and return it '''
if not os.path.isfile(path):
raise ImportError(f"Module '{unique_name}' not found at path '{path}'")

spec = importlib.util.spec_from_file_location(unique_name, path)

module = importlib.util.module_from_spec(spec)

spec.loader.exec_module(module)

return module

0 comments on commit f016538

Please sign in to comment.