Ticket #6069: trac_6069-missing-published-worksheet.patch

File trac_6069-missing-published-worksheet.patch, 830 bytes (added by timdumol, 10 years ago)

This says that "There is no published worksheet with name '%s'" instead.

  • sagenb/notebook/twist.py

    #6069 Make error message for nonexistent published page more informative
    
    diff -r a7ed38958d7d sagenb/notebook/twist.py
    a b  
    16091609        try:
    16101610            return Worksheet(filename, self.username)
    16111611        except KeyError:
    1612             s = "The user '%s' has no worksheet '%s'."%(self.user, name)
     1612            if self.user != 'pub':
     1613                s = "The user '%s' has no worksheet '%s'."%(self.user, name)
     1614            else:
     1615                s = 'There is no published worksheet with name "%s"' % name
    16131616            return InvalidPage(msg = s, username = self.user)
    16141617        except RuntimeError:
    16151618            s = "You are not logged in or do not have access to the worksheet '%s'."%name