def __init__(self, bitHopper): self.bitHopper = bitHopper pool_configs = [] for dirpath, dirnames, filenames in os.walk('plugins'): for name in filenames: try: if name.split('.')[1] == 'cfg': pool_configs.append(os.path.join(dirpath, name)) except Exception, e: print e
def load_cfg(self): """Load all config files from plugin directory""" logging.info('Loading Config Files') pool_configs = [] for dirpath, dirnames, filenames in os.walk('plugins'): for name in filenames: try: if name.split('.')[-1] == 'cfg': pool_configs.append(os.path.join(dirpath, name)) except Exception, e: logging.info("Unable to load config file for:\n%s \n\n%s") % (dirpath, e)
def load_cfg(self): """Load all config files from plugin directory""" self.bitHopper.log_msg('Loading Config Files') pool_configs = [] for dirpath, dirnames, filenames in os.walk('plugins'): for name in filenames: try: if name.split('.')[-1] == 'cfg': pool_configs.append(os.path.join(dirpath, name)) except Exception, e: print e
def load_cfg(self): """Load all config files from plugin directory""" logging.info('Loading Config Files') pool_configs = [] for dirpath, dirnames, filenames in os.walk('plugins'): for name in filenames: try: if name.split('.')[-1] == 'cfg': pool_configs.append(os.path.join(dirpath, name)) except Exception, e: logging.info("Unable to load config file for:\n%s \n\n%s" ) % (dirpath, e)