diff --git a/ifupdown2/ifupdown/ifupdownmain.py b/ifupdown2/ifupdown/ifupdownmain.py index 51f54609..6a1ac12b 100644 --- a/ifupdown2/ifupdown/ifupdownmain.py +++ b/ifupdown2/ifupdown/ifupdownmain.py @@ -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)