/[packages]/updates/infra_1/irker/current/SOURCES/0001-irkerhook.py-allow-values-in-irker.conf-containing.patch
ViewVC logotype

Annotation of /updates/infra_1/irker/current/SOURCES/0001-irkerhook.py-allow-values-in-irker.conf-containing.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 342837 - (hide annotations) (download)
Tue Jan 8 11:24:37 2013 UTC (11 years, 5 months ago) by boklm
File size: 1320 byte(s)
Add patch to allow values containing '=' in irker.conf


1 boklm 342837 From 0fa054c83b24cf17dbf0d4d14bcba70cdf9d58c5 Mon Sep 17 00:00:00 2001
2     From: Nicolas Vigier <boklm@hupstream.com>
3     Date: Mon, 7 Jan 2013 21:03:01 +0100
4     Subject: [PATCH 1/2] irkerhook.py: allow values in irker.conf containing '='
5    
6     It is often necessary to use values containing '=' when setting
7     URL templates for urlprefix or tinyifier.
8     ---
9     irkerhook.py | 8 ++------
10     1 file changed, 2 insertions(+), 6 deletions(-)
11    
12     diff --git a/irkerhook.py b/irkerhook.py
13     index 59bd796..2ccdc2e 100755
14     --- a/irkerhook.py
15     +++ b/irkerhook.py
16     @@ -147,15 +147,11 @@ class GenericExtractor:
17     ln += 1
18     if line.startswith("#") or not line.strip():
19     continue
20     - elif line.count('=') != 1:
21     + elif line.count('=') == 0:
22     sys.stderr.write('"%s", line %d: missing = in config line\n' \
23     % (conf, ln))
24     continue
25     - fields = line.split('=')
26     - if len(fields) != 2:
27     - sys.stderr.write('"%s", line %d: too many fields in config line\n' \
28     - % (conf, ln))
29     - continue
30     + fields = line.split('=', 1)
31     variable = fields[0].strip()
32     value = fields[1].strip()
33     if value.lower() == "true":
34     --
35     1.7.10
36    

  ViewVC Help
Powered by ViewVC 1.1.30