Commits

Anonymous committed fd63e84

fix tests failing due to rename by making the comment default u'' rather than None

  • Participants
  • Parent commits cf39150

Comments (0)

Files changed (1)

File MoinMoin/PageEditor.py

             request.theme.add_msg(_('Edit was cancelled.'), "error")
             self.send_page()
 
-    def copyPage(self, newpagename, comment=None):
+    def copyPage(self, newpagename, comment=u''):
         """ Copy the current version of the page (keeping the backups, logs and attachments).
 
         @param comment: Comment given by user
         try:
             filesys.copytree(oldpath, newpath)
             self.error = None
-            if not comment:
-                comment = u"## page was copied from %s" % self.page_name
             savetext = u"## page was copied from %s\n%s" % (self.page_name, savetext)
             Page.__init__(self, request, newpagename)
             self._write_file(savetext, "SAVENEW", comment)
             else:
                 return False, _('Could not copy page because of file system error: %s.') % unicode(err)
 
-    def renamePage(self, newpagename, comment=None):
+    def renamePage(self, newpagename, comment=u''):
         """ Rename the current version of the page (making a backup before deletion
             and keeping the backups, logs and attachments).