Mwalker has submitted this change and it was merged. Change subject: read config from /etc/fundraising ......................................................................
read config from /etc/fundraising Deployment: * Stop job. apply patch and move config. restart Change-Id: I82a0820b21c5304c9a9af3ff342497650aea922f --- M FundraiserStatisticsGen/fundstatgen.py 1 file changed, 4 insertions(+), 2 deletions(-) Approvals: Mwalker: Looks good to me, approved diff --git a/FundraiserStatisticsGen/fundstatgen.py b/FundraiserStatisticsGen/fundstatgen.py index 3c4f2cb..21ed704 100644 --- a/FundraiserStatisticsGen/fundstatgen.py +++ b/FundraiserStatisticsGen/fundstatgen.py @@ -14,6 +14,8 @@ import logging from logging.handlers import SysLogHandler +CONFIG_DEFAULT_PATH = "/etc/fundraising/fundstatgen.cfg" + def main(): # Extract any command line options parser = OptionParser(usage="usage: %prog [options] <working directory>") @@ -27,8 +29,8 @@ # Load the configuration from the file config = SafeConfigParser() - fileList = ['./fundstatgen.cfg'] - if options.configFile is not None: + fileList = [CONFIG_DEFAULT_PATH] + if options.configFile: fileList.append(options.configFile) config.read(fileList) -- To view, visit https://gerrit.wikimedia.org/r/134728 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I82a0820b21c5304c9a9af3ff342497650aea922f Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/tools Gerrit-Branch: master Gerrit-Owner: Adamw <awi...@wikimedia.org> Gerrit-Reviewer: Jgreen <jgr...@wikimedia.org> Gerrit-Reviewer: Katie Horn <kh...@wikimedia.org> Gerrit-Reviewer: Mwalker <mwal...@wikimedia.org> Gerrit-Reviewer: Ssmith <ssm...@wikimedia.org> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits