]> git.ozlabs.org Git - patchwork/blobdiff - apps/patchwork/bin/pwclient
pwclient: rename variable CONFIG_FILES to be singular
[patchwork] / apps / patchwork / bin / pwclient
index 5fce359e591ab213f34719ca414b9875960e0595..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."""
@@ -231,7 +231,7 @@ def action_info(rpc, patch_id):
     print(s)
     print('-' * len(s))
     for key, value in sorted(patch.iteritems()):
-        print("- %- 14s: %s" % (key, value))
+        print("- %- 14s: %s" % (key, unicode(value).encode("utf-8")))
 
 def action_get(rpc, patch_id):
     patch = rpc.patch_get(patch_id)
@@ -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'):