diff options
| author | Georg Brandl <georg@python.org> | 2010-11-20 11:25:37 +0100 |
|---|---|---|
| committer | Georg Brandl <georg@python.org> | 2010-11-20 11:25:37 +0100 |
| commit | 8da28f933b926c60fb85c09d00edc650453e59d6 (patch) | |
| tree | 69ff50737ad53ccf682c96f53a171b5544334e61 /sphinx/websupport | |
| parent | bf8a470cfeda7aa8322c52aa991ea456a3956f3a (diff) | |
| download | sphinx-8da28f933b926c60fb85c09d00edc650453e59d6.tar.gz | |
Avoid "import *" and remove unused import/variable.
Diffstat (limited to 'sphinx/websupport')
| -rw-r--r-- | sphinx/websupport/__init__.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sphinx/websupport/__init__.py b/sphinx/websupport/__init__.py index a0a6787a..f410e10d 100644 --- a/sphinx/websupport/__init__.py +++ b/sphinx/websupport/__init__.py @@ -19,9 +19,9 @@ from jinja2 import Environment, FileSystemLoader from sphinx.application import Sphinx from sphinx.util.osutil import ensuredir from sphinx.util.jsonimpl import dumps as dump_json +from sphinx.websupport import errors from sphinx.websupport.search import BaseSearch, SEARCH_ADAPTERS from sphinx.websupport.storage import StorageBackend -from sphinx.websupport.errors import * class WebSupportApp(Sphinx): @@ -103,7 +103,7 @@ class WebSupport(object): It will also save node data to the database. """ if not self.srcdir: - raise SrcdirNotSpecifiedError( \ + raise errors.SrcdirNotSpecifiedError( \ 'No srcdir associated with WebSupport object') doctreedir = path.join(self.outdir, 'doctrees') app = WebSupportApp(self.srcdir, self.srcdir, @@ -158,7 +158,7 @@ class WebSupport(object): try: f = open(infilename, 'rb') except IOError: - raise DocumentNotFoundError( + raise errors.DocumentNotFoundError( 'The document "%s" could not be found' % docname) document = pickle.load(f) @@ -334,7 +334,7 @@ class WebSupport(object): :param moderator: Whether the user making the request is a moderator. """ if not moderator: - raise UserNotAuthorizedError() + raise errors.UserNotAuthorizedError() self.storage.accept_comment(comment_id) def reject_comment(self, comment_id, moderator=False): @@ -347,7 +347,7 @@ class WebSupport(object): :param moderator: Whether the user making the request is a moderator. """ if not moderator: - raise UserNotAuthorizedError() + raise errors.UserNotAuthorizedError() self.storage.reject_comment(comment_id) def _make_base_comment_options(self): |
