diff --git a/cic/cmd/export.py b/cic/cmd/export.py index 5199967..bfaa6b0 100644 --- a/cic/cmd/export.py +++ b/cic/cmd/export.py @@ -71,8 +71,6 @@ def init_writers_from_config(config): ExtraArgs = { "target": str, - "key_file_path": str, - "gpg_passphrase": str, "directory": str, "output_directory": str, "metadata_endpoint": Optional[str], @@ -81,9 +79,6 @@ ExtraArgs = { def execute(config, eargs: ExtraArgs): - # !TODO Remove this - eargs.key_file_path = "/home/will/grassroots/cic-internal-integration/apps/cic-ussd/tests/data/pgp/privatekeys_meta.asc" - eargs.gpg_passphrase = "merman" modname = f"cic.ext.{eargs.target}" cmd_mod = importlib.import_module(modname) @@ -93,8 +88,8 @@ def execute(config, eargs: ExtraArgs): if eargs.metadata_endpoint != None: MetadataRequestsHandler.base_url = eargs.metadata_endpoint MetadataSigner.gpg_path = os.path.join("/tmp") - MetadataSigner.key_file_path = eargs.key_file_path - MetadataSigner.gpg_passphrase = eargs.gpg_passphrase + MetadataSigner.key_file_path = config.get("AUTH_KEYFILE_PATH") + MetadataSigner.gpg_passphrase = config.get("AUTH_PASSPHRASE") writers["proof"] = KeyedWriterFactory(MetadataWriter, HTTPWriter).new writers["attachment"] = KeyedWriterFactory(None, HTTPWriter).new writers["meta"] = MetadataWriter