diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libbugzilla.js | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/lib/libbugzilla.js b/lib/libbugzilla.js index 613dbb3..7e2398b 100644 --- a/lib/libbugzilla.js +++ b/lib/libbugzilla.js @@ -19,6 +19,10 @@ var JSONURLDefault = "https://fedorahosted.org/released"+ "/bugzilla-triage-scripts/Config_data.json"; var BTSPrefNS = "bugzilla-triage.setting."; var BTSPassRealm = "BTSXMLRPCPass"; +var copiedAttributes = [ "queryButton", "upstreamButton", "parseAbrtBacktraces", + "submitsLogging", "XorgLogAnalysis", "objectStyle", "signature", + "suspiciousComponents" ]; + var passwords = {}; // hash of passwords indexed by a hostname var config = exports.config = {}; @@ -167,6 +171,7 @@ exports.getInstalledPackages = function getInstalledPackages(locationLoginObj, c } } + var allIdx = null; if ((allIdx = enabledPackages.indexOf("all")) != -1) { enabledPackages = enabledPackages.splice(allIdx, @@ -377,15 +382,11 @@ exports.initialize = function initialize(config, callback) { config.configData.defBugzillaMaintainerArr = config.constantData.CCmaintainer; } - if ("suspiciousComponents" in config.gJSONData.configData) { - config.configData.suspiciousComponents = - config.gJSONData.configData.suspiciousComponents; - } - - if ("XorgLogAnalysis" in config.gJSONData.configData) { - config.configData.xorglogAnalysis = - config.gJSONData.configData.XorgLogAnalysis; - } + copiedAttributes.forEach(function (attrib) { + if (attrib in config.gJSONData.configData) { + config.configData[attrib] = config.gJSONData.configData[attrib]; + } + }); if ("submitsLogging" in config.gJSONData.configData && config.gJSONData.configData.submitsLogging) { |