- use an OS independant way of identifying base module directory - use a more portable way of reading stty output
This commit is contained in:
parent
4db660b86c
commit
3f40fb2de7
2 changed files with 8 additions and 5 deletions
|
|
@ -117,11 +117,12 @@ class ModulesLoader(object):
|
|||
except ImportError:
|
||||
return
|
||||
for path in weboob.backends.__path__:
|
||||
regexp = re.compile('^%s/([\w\d_]+)$' % path)
|
||||
self.logger.debug( 'Backend path: %s' % path )
|
||||
for root, dirs, files in os.walk(path):
|
||||
m = regexp.match(root)
|
||||
if m and '__init__.py' in files:
|
||||
yield m.group(1)
|
||||
self.logger.debug( 'Walking on %s' % root )
|
||||
if os.path.dirname( root ) == path and '__init__.py' in files:
|
||||
s = os.path.basename( root )
|
||||
yield s
|
||||
|
||||
def load_all(self):
|
||||
for existing_module_name in self.iter_existing_module_names():
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue