diff --git a/CHANGELOG b/CHANGELOG index 7126c4b..5d3af6d 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -13,6 +13,7 @@ v0.3 (unreleased): - IRC: Try not to join channels before NickServ auth has completed. - IRC: Improved detection of maximum IRC message length. - IRC: Improved some help commands. +- Wiki: Fixed Page.toggle_talk() behavior on mainspace titles with colons. v0.2 (released November 8, 2015): diff --git a/earwigbot/wiki/page.py b/earwigbot/wiki/page.py index 00a32ca..b05f9ff 100644 --- a/earwigbot/wiki/page.py +++ b/earwigbot/wiki/page.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # -# Copyright (C) 2009-2015 Ben Kurtovic +# Copyright (C) 2009-2019 Ben Kurtovic # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal @@ -552,9 +552,9 @@ class Page(CopyvioMixIn): else: new_ns = self._namespace + 1 - try: + if self._namespace != 0: body = self._title.split(":", 1)[1] - except IndexError: + else: body = self._title new_prefix = self.site.namespace_id_to_name(new_ns)