Skip to content

Commit

Permalink
[url] Add a guard for pytest calling the setup when it shouldn't.
Browse files Browse the repository at this point in the history
  • Loading branch information
ari-koivula committed Jun 28, 2013
1 parent ff4c1f9 commit 767de38
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion url.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,12 @@ def configure(config):
'Prefix to suppress URL titling', '!')


def setup(bot):
def setup(bot=None):
global url_finder, exclusion_char

if not bot:
return

if bot.config.has_option('url', 'exclude'):
regexes = [re.compile(s) for s in
bot.config.url.get_list(bot.config.exclude)]
Expand Down

0 comments on commit 767de38

Please sign in to comment.