Skip to content

Commit

Permalink
Merge pull request #977 from vnitinv/fix-1544
Browse files Browse the repository at this point in the history
call MetaPathLoader only for jnpr.junos* modules
  • Loading branch information
Nitin Kr authored Nov 28, 2019
2 parents 0a88d6b + 95d8453 commit f8c0e2a
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions lib/jnpr/junos/op/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,11 @@

class MetaPathFinder(object):
def find_module(self, fullname, path=None):
mod = fullname.split('.')[-1]
if mod in [os.path.splitext(i)[0] for i in os.listdir(
os.path.dirname(__file__))]:
return MetaPathLoader()
if fullname.startswith('jnpr.junos'):
mod = fullname.split('.')[-1]
if mod in [os.path.splitext(i)[0] for i in os.listdir(
os.path.dirname(__file__))]:
return MetaPathLoader()


class MetaPathLoader(object):
Expand Down

0 comments on commit f8c0e2a

Please sign in to comment.