Просмотр исходного кода

Fix Page.toggle_talk() on mainspace titles with colons.

tags/v0.3
Ben Kurtovic 5 лет назад
Родитель
Сommit
c68a5e6dfb
2 измененных файлов: 4 добавлений и 3 удалений
  1. +1
    -0
      CHANGELOG
  2. +3
    -3
      earwigbot/wiki/page.py

+ 1
- 0
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):



+ 3
- 3
earwigbot/wiki/page.py Просмотреть файл

@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
#
# Copyright (C) 2009-2015 Ben Kurtovic <ben.kurtovic@gmail.com>
# Copyright (C) 2009-2019 Ben Kurtovic <ben.kurtovic@gmail.com>
#
# 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)


Загрузка…
Отмена
Сохранить