Changeset 820:359af5284287 in hatta-dev
- Timestamp:
- 08/17/10 23:51:44 (21 months ago)
- Branch:
- default
- Files:
-
- 3 edited
-
examples/slides/slides.py (modified) (1 diff)
-
hatta/page.py (modified) (3 diffs)
-
hatta/wiki.py (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
examples/slides/slides.py
r787 r820 34 34 try: 35 35 html = ''.join(page.view_content()) 36 except hatta. NotFoundErr:36 except hatta.error.NotFoundErr: 37 37 continue 38 38 slide_title = (u'<h1>%s</h1>' % werkzeug.escape(label)) -
hatta/page.py
r811 r820 242 242 self.wiki._check_lock(self.title) 243 243 edit_url = self.get_url(self.title, self.wiki.edit) 244 except ForbiddenErr:244 except error.ForbiddenErr: 245 245 pass 246 246 … … 288 288 self.wiki._check_lock(title) 289 289 read_only = False 290 except ForbiddenErr:290 except error.ForbiddenErr: 291 291 read_only = True 292 292 for rev, date, author, comment in self.wiki.storage.page_history(title): … … 631 631 im.save(cache_file,'PNG') 632 632 except IOError: 633 raise UnsupportedMediaTypeErr('Image corrupted')633 raise error.UnsupportedMediaTypeErr('Image corrupted') 634 634 cache_file.close() 635 635 return cache_path -
hatta/wiki.py
r810 r820 23 23 import data 24 24 25 import mercurial # import it after storage! 25 26 26 27 class WikiResponse(werkzeug.BaseResponse, werkzeug.ETagResponseMixin, … … 411 412 for link, label in page.extract_links(text): 412 413 if title == link: 413 raise ForbiddenErr(414 raise error.ForbiddenErr( 414 415 _(u"This page is locked.")) 415 416 if u'href="' in comment or u'http:' in comment: 416 raise ForbiddenErr()417 raise error.ForbiddenErr() 417 418 if text.strip() == '': 418 419 self.storage.delete_page(title, author, comment) … … 855 856 _ = self.gettext 856 857 if pygments is None: 857 raise NotImplementedErr(_(u"Code highlighting is not available.")) 858 raise error.NotImplementedErr( 859 _(u"Code highlighting is not available.")) 858 860 859 861 pygments_style = self.pygments_style … … 894 896 _ = self.gettext 895 897 if not self.config.get_bool('hgweb', False): 896 raise ForbiddenErr(_(u'Repository access disabled.'))898 raise error.ForbiddenErr(_(u'Repository access disabled.')) 897 899 app = mercurial.hgweb.request.wsgiapplication( 898 900 lambda: mercurial.hgweb.hgweb(self.storage.repo, self.site_name)) … … 912 914 _ = self.gettext 913 915 if not request.remote_addr.startswith('127.'): 914 raise ForbiddenErr(_(u'This URL can only be called locally.'))916 raise error.ForbiddenErr(_(u'This URL can only be called locally.')) 915 917 def agony(): 916 918 yield u'Oh dear!'
Note: See TracChangeset
for help on using the changeset viewer.
