Skip to content

Commit

Permalink
Support PYCompiled Modules
Browse files Browse the repository at this point in the history
Signed-off-by: Antoine "toinux" LESIEUR <26522723+itzwam@users.noreply.github.com>
  • Loading branch information
itzwam committed Oct 17, 2023
1 parent 10b9cf6 commit 3d4a031
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ifupdown2/ifupdown/ifupdownmain.py
Original file line number Diff line number Diff line change
Expand Up @@ -1433,6 +1433,10 @@ def load_addon_modules(self, modules_dir_list):
if self.modules.get(mname):
continue
mpath = modules_dir + '/' + mname + '.py'
if not os.path.exists(mpath):
mpathc = modules_dir + '/' + mname + '.pyc'
if os.path.exists(mpathc):
mpath = mpathc
if os.path.exists(mpath) and mpath not in failed_import:
try:
m = __import__(mname)
Expand Down

0 comments on commit 3d4a031

Please sign in to comment.