From 71444a89937f469527241ee69599bbaa243063ba Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Thu, 18 Apr 2013 06:02:41 -0400 Subject: [PATCH] Support new-style config file location. --- NEWS | 3 +++ coverity-submit | 7 +++++-- coverity-submit.xml | 5 +++-- 3 files changed, 11 insertions(+), 4 deletions(-) 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] -- 2.43.0