Skip to content

Commit 3d4a031

Browse files
itzwamAntoine LESIEUR
authored andcommitted
Support PYCompiled Modules
Signed-off-by: Antoine "toinux" LESIEUR <26522723+itzwam@users.noreply.github.com>
1 parent 10b9cf6 commit 3d4a031

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

ifupdown2/ifupdown/ifupdownmain.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1433,6 +1433,10 @@ def load_addon_modules(self, modules_dir_list):
14331433
if self.modules.get(mname):
14341434
continue
14351435
mpath = modules_dir + '/' + mname + '.py'
1436+
if not os.path.exists(mpath):
1437+
mpathc = modules_dir + '/' + mname + '.pyc'
1438+
if os.path.exists(mpathc):
1439+
mpath = mpathc
14361440
if os.path.exists(mpath) and mpath not in failed_import:
14371441
try:
14381442
m = __import__(mname)

0 commit comments

Comments
 (0)