def _get_config(name, exporter): '''shared function to return a file in the config directory ''' exporter_path = exporter or '' template_path = os.path.join(get_installdir(), 'config', 'templates', exporter_path, name) if os.path.exists(template_path): return os.path.abspath(template_path) else: bot.info( 'The exporter specified does not exist : %s. The task was created with no exporters. ' % exporter) return os.path.abspath( os.path.join(get_installdir(), 'config', 'templates', name))
def test_get_installdir(self): '''get install directory should return the base of where singularity is installed ''' print("Testing utils.get_installdir") from watchme.utils import get_installdir whereami = get_installdir() print(whereami) self.assertTrue(whereami.endswith('watchme'))
def _get_config(name): '''shared function to return a file in the config directory ''' return os.path.abspath(os.path.join(get_installdir(), 'config', name))
def _get_config(name): """shared function to return a file in the config directory """ return os.path.abspath(os.path.join(get_installdir(), "config", name))