Skip to content

Commit

Permalink
[bugzilla, url] Use get_list for config option lists
Browse files Browse the repository at this point in the history
  • Loading branch information
embolalia committed Mar 4, 2013
1 parent 8785c67 commit 98764e2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions bugzilla.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def configure(config):
def setup(willie):
regexes = []
if willie.config.has_option('bugzilla', 'domains'):
for domain in willie.config.bugzilla.domains:
for domain in willie.config.bugzilla.get_list(domains):
regex = re.compile('%s/show_bug.cgi\?\S*?id=(\d+)' % domain)
regexes.append(regex)
else:
Expand All @@ -46,7 +46,7 @@ def setup(willie):
def show_bug(willie, trigger):
"""Show information about a Bugzilla bug."""
domain = trigger.group(1)
if domain not in willie.config.bugzilla.domains:
if domain not in willie.config.bugzilla.get_list('domains'):
return
url = 'https://%s%sctype=xml&%s' % trigger.groups()
data = web.get(url)
Expand Down
3 changes: 2 additions & 1 deletion url.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ def configure(config):
def setup(willie):
global url_finder, exclusion_char
if willie.config.has_option('url', 'exclude'):
regexes = [re.compile(s) for s in willie.config.url.exclude]
regexes = [re.compile(s) for s in
willie.config.url.get_list(exclude)]
else:
regexes = []

Expand Down

0 comments on commit 98764e2

Please sign in to comment.