Bug 1347579 - Address Review nits. r=aki
MozReview-Commit-ID: 8Wd87HACdwO
--- a/testing/mozharness/configs/repackage/osx_signed.py
+++ b/testing/mozharness/configs/repackage/osx_signed.py
@@ -1,12 +1,11 @@
import os
config = {
- "signed_input": os.environ['SIGNED_INPUT'], # Required Env Var
"input_filename": "target.tar.gz",
"output_filename": "target.dmg",
"input_home": "/home/worker/workspace/inputs",
# ToolTool
"tooltool_manifest_src": 'browser/config/tooltool-manifests/macosx64/cross-releng.manifest',
"tooltool_url": 'http://relengapi/tooltool/',
"tooltool_bootstrap": "setup.sh",
--- a/testing/mozharness/scripts/repackage.py
+++ b/testing/mozharness/scripts/repackage.py
@@ -9,16 +9,17 @@ from mozharness.mozilla.mock import ERRO
class Repackage(BaseScript):
config_options = [[
['--signed-input', ],
{"action": "store",
"dest": "signed_input",
"type": "string",
+ "default": os.environ.get('SIGNED_INPUT'),
"help": "Specify the signed input (url)"}
], [
['--output-file', ],
{"action": "store",
"dest": "output_file",
"type": "string",
"help": "Specify the output filename"}
]]
@@ -33,16 +34,20 @@ class Repackage(BaseScript):
}
BaseScript.__init__(
self,
config_options=self.config_options,
require_config_file=require_config_file,
**script_kwargs
)
+ # Assert we have it either passed in or in environment
+ assert self.config.get('signed_input'), \
+ "Must pass --signed-input or be set in the environment as SIGNED_INPUT"
+
def download_input(self):
config = self.config
url = config['signed_input']
status = self.download_file(url=url,
file_name=config['input_filename'],
parent_dir=config['input_home'])
if not status: