From: Eric S. Raymond Date: Thu, 18 Apr 2013 10:02:41 +0000 (-0400) Subject: Support new-style config file location. X-Git-Tag: 1.8 X-Git-Url: http://thyrsus.com/gitweb/?a=commitdiff_plain;h=897aa9917c481f0c0c6a5d6a3410581114e30b09;p=coverity-submit.git Support new-style config file location. --- diff --git a/NEWS b/NEWS index 556acf5..67cc8a0 100644 --- a/NEWS +++ b/NEWS @@ -1,5 +1,8 @@ NEWS file for coverty-submit +1.8 @ 2013-04-18 + Support new-style config location, ~/.config/coverity-submit + 1.7 @ 2013-03-17 Merge James Hunt's support for the build and tag options. diff --git a/coverity-submit b/coverity-submit index dcfcb6c..c87f305 100755 --- a/coverity-submit +++ b/coverity-submit @@ -6,13 +6,16 @@ # import os, sys, ConfigParser, getopt, tempfile -version = "1.7" +version = "1.8" if __name__ == '__main__': name = email = project = password = url = None config = ConfigParser.RawConfigParser() - config.read(os.path.expanduser("~/.coverity-submit")) + if os.path.exists(os.path.expanduser("~/.config/coverity-submit")): + config.read(os.path.expanduser("~/.config/coverity-submit")) + else: + config.read(os.path.expanduser("~/.coverity-submit")) def die(complaint): sys.stderr.write(complaint + "\n") diff --git a/coverity-submit.xml b/coverity-submit.xml index 0061bb9..8e3472d 100644 --- a/coverity-submit.xml +++ b/coverity-submit.xml @@ -40,8 +40,9 @@ retrieving the request status. CONFIGURATION To use this tool, you need to set up a configuration file named -.coverity-submit in your home directory. This -configuration file is best explained by example. +either .coverity-submit or +.config/coverity-submit in your home directory. +This configuration file is best explained by example. [ALL]