Added atlernate configuration file parameter.

This commit is contained in:
Christian P. MOMON 2020-02-05 10:29:53 +01:00 committed by root
parent 9bbdea0bbb
commit 2de7d495d3

View File

@ -17,7 +17,11 @@ hello_list = ["hello", "yo", "bonjour", "salut"]
# Load configuration.
configurationFilename="/etc/redminebot/redminebot.conf"
if len(sys.argv) == 2:
configurationFilename=sys.argv[1]
if os.path.isfile(configurationFilename):
print "Using configuration file: " + configurationFilename
config = ConfigParser.RawConfigParser()
config.read(configurationFilename)