Beispiel #1
0
 def setUp(self):
     self.base_path = os.path.join(TEST_DIRECTORY,
                                   get_unique_hexa_identifier())
     init_plugins_base(self.base_path)
     self.original_metwork_layers_path = os.environ["METWORK_LAYERS_PATH"]
     os.environ["METWORK_LAYERS_PATH"] = \
         os.environ["METWORK_LAYERS_PATH"] + ":%s" % self.base_path
Beispiel #2
0
def main():
    arg_parser = argparse.ArgumentParser(description=DESCRIPTION)
    arg_parser.parse_args()
    echo_running("- Creating plugins base...")
    try:
        init_plugins_base()
    except MFUtilPluginCantInit as e:
        echo_nok()
        print(e)
        sys.exit(1)
    if not is_plugins_base_initialized():
        echo_nok()
        sys.exit(1)
    echo_ok()
Beispiel #3
0
def main():
    arg_parser = argparse.ArgumentParser(description=DESCRIPTION)
    arg_parser.add_argument("--plugins-base-dir",
                            type=str,
                            default=None,
                            help="can be use to set an alternate "
                            "plugins-base-dir, if not set the value of "
                            "MFMODULE_PLUGINS_BASE_DIR env var is used (or a "
                            "hardcoded standard value).")
    args = arg_parser.parse_args()
    echo_running("- Creating plugins base...")
    try:
        init_plugins_base(args.plugins_base_dir)
    except MFUtilPluginCantInit as e:
        echo_nok()
        print(e)
        sys.exit(1)
    if not is_plugins_base_initialized():
        echo_nok()
        sys.exit(1)
    echo_ok()
Beispiel #4
0
 def setUp(self):
     self.base_path = os.path.join(TEST_DIRECTORY,
                                   get_unique_hexa_identifier())
     init_plugins_base(self.base_path)