]> git.ozlabs.org Git - patchwork/commitdiff
pwclient: rename variable CONFIG_FILES to be singular
authorYann E. MORIN <yann.morin.1998@free.fr>
Tue, 1 Jul 2014 18:14:23 +0000 (20:14 +0200)
committerJeremy Kerr <jk@ozlabs.org>
Fri, 4 Jul 2014 00:37:46 +0000 (08:37 +0800)
We only support a single config file, so there is no need to have a
plural in this variable.

Also, we'll need to know what the default config file is, when we want
to save it to migrate to the new format.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
apps/patchwork/bin/pwclient

index 0c0ccaff7fd25372f50bcda7ebfb4ddd3e4f54f4..2104f593f9ca37618d33cc4bee0530366aaea76a 100755 (executable)
@@ -34,7 +34,7 @@ import ConfigParser
 # for the URL to access.  If that is unspecified, it will fallback to
 # the hardcoded default value specified here.
 DEFAULT_URL = "http://patchwork/xmlrpc/"
-CONFIG_FILES = [os.path.expanduser('~/.pwclientrc')]
+CONFIG_FILE = os.path.expanduser('~/.pwclientrc')
 
 class Filter:
     """Filter for selecting patches."""
@@ -351,7 +351,7 @@ def main():
     url = DEFAULT_URL
 
     config = ConfigParser.ConfigParser()
-    config.read(CONFIG_FILES)
+    config.read([CONFIG_FILE])
 
     # grab settings from config files
     if config.has_option('base', 'url'):