diff options
author | Lars-Dominik Braun <lars@6xq.net> | 2019-03-05 11:46:27 +0100 |
---|---|---|
committer | Lars-Dominik Braun <lars@6xq.net> | 2019-03-05 11:46:27 +0100 |
commit | 047c3dbc9871ce93a26057ba339efb7c53724910 (patch) | |
tree | 2aae6e2afcaee98970c568e2322cff5fd38f6baa /crocoite/controller.py | |
parent | 98e668eaab64005cdccc204a787658743d3ece0f (diff) | |
download | crocoite-047c3dbc9871ce93a26057ba339efb7c53724910.tar.gz crocoite-047c3dbc9871ce93a26057ba339efb7c53724910.tar.bz2 crocoite-047c3dbc9871ce93a26057ba339efb7c53724910.zip |
Replace mutable default arguments
This fixes IRC permission checks. Previously all users who joined the
channel after the bot stored their modes in the same set().
Can be detected with pylint W0102.
Diffstat (limited to 'crocoite/controller.py')
-rw-r--r-- | crocoite/controller.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crocoite/controller.py b/crocoite/controller.py index eb8908c..788a131 100644 --- a/crocoite/controller.py +++ b/crocoite/controller.py @@ -108,13 +108,13 @@ class SinglePageController: def __init__ (self, url, logger, \ service, behavior=cbehavior.available, \ - settings=defaultSettings, handler=[]): + settings=defaultSettings, handler=None): self.url = url self.service = service self.behavior = behavior self.settings = settings self.logger = logger.bind (context=type (self).__name__, url=url) - self.handler = handler + self.handler = handler or [] def processItem (self, item): for h in self.handler: |