Skip to content

Commit 3d4a031

Browse files
committed
Support PYCompiled Modules
Signed-off-by: Antoine "toinux" LESIEUR <[email protected]>
1 parent 10b9cf6 commit 3d4a031

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

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)