Fix bug in submission introduced when rebasing.
diff --git a/infocalypse/submission.py b/infocalypse/submission.py --- a/infocalypse/submission.py +++ b/infocalypse/submission.py @@ -205,11 +205,6 @@ def bundle_wikitext(overlay, version, su names = (set(overlay.list_pages(wiki_text)). union(overlay.list_pages(wiki_text, True))) - illegal_writes = names.intersection(get_read_only_list(overlay)) - if len(illegal_writes) > 0: - raise SubmitError("Can't modify read only page(s): %s" % - ','.join(illegal_writes), True) - # Catch illegal names. for name in names: if not WIKINAME_REGEX.match(name): @@ -226,6 +221,8 @@ def bundle_wikitext(overlay, version, su names, OverlayHasher(overlay).hexdigest) + illegal_writes = get_read_only_list(overlay) + buf = StringIO.StringIO() arch = ZipFile(buf, 'w') assert version @@ -252,6 +249,9 @@ def bundle_wikitext(overlay, version, su # directory. continue + if name in illegal_writes: + raise SubmitError("Can't modify read only page: %s" % name, True) + # Make patch. delta = unicode_make_patch(original_raw, new_raw) diff --git a/infocalypse/wikibot.py b/infocalypse/wikibot.py --- a/infocalypse/wikibot.py +++ b/infocalypse/wikibot.py @@ -543,6 +543,9 @@ class WikiBot(FMSBot, RequestQueue): if not long_msg.endswith('\n'): long_msg += '\n' + self.trace("_send_status_notification -- [%s] [%s]" % + (short_msg, long_msg)) + self.parent.queue_msg((self.params['FMS_ID'], self.params['FMS_GROUP'], 'wikibot[%s]:%s' % (self.params['USK_HASH'],