Show More
@@ -33,7 +33,7 b' from collections import OrderedDict, def' | |||||
33 | from tg import request, response |
|
33 | from tg import request, response | |
34 | from tg import tmpl_context as c |
|
34 | from tg import tmpl_context as c | |
35 | from tg.i18n import ugettext as _ |
|
35 | from tg.i18n import ugettext as _ | |
36 |
from webob.exc import HTTPBadRequest, HTTPForbidden, |
|
36 | from webob.exc import HTTPBadRequest, HTTPForbidden, HTTPNotFound | |
37 |
|
37 | |||
38 | import kallithea.lib.helpers as h |
|
38 | import kallithea.lib.helpers as h | |
39 | from kallithea.lib import diffs |
|
39 | from kallithea.lib import diffs |
@@ -1,6 +1,3 b'' | |||||
1 | from kallithea.lib.vcs.exceptions import VCSError |
|
|||
2 |
|
||||
3 |
|
||||
4 |
|
|
1 | def import_class(class_path): | |
5 | """ |
|
2 | """ | |
6 | Returns class from the given path. |
|
3 | Returns class from the given path. | |
@@ -8,10 +5,7 b' def import_class(class_path):' | |||||
8 | For example, in order to get class located at |
|
5 | For example, in order to get class located at | |
9 | ``vcs.backends.hg.MercurialRepository``: |
|
6 | ``vcs.backends.hg.MercurialRepository``: | |
10 |
|
7 | |||
11 | try: |
|
8 | hgrepo = import_class('vcs.backends.hg.MercurialRepository') | |
12 | hgrepo = import_class('vcs.backends.hg.MercurialRepository') |
|
|||
13 | except VCSError: |
|
|||
14 | # handle error |
|
|||
15 | """ |
|
9 | """ | |
16 | splitted = class_path.split('.') |
|
10 | splitted = class_path.split('.') | |
17 | mod_path = '.'.join(splitted[:-1]) |
|
11 | mod_path = '.'.join(splitted[:-1]) |
@@ -112,8 +112,8 b' try:' | |||||
112 | long_description = open(README_FILE).read() |
|
112 | long_description = open(README_FILE).read() | |
113 | except IOError as err: |
|
113 | except IOError as err: | |
114 | sys.stderr.write( |
|
114 | sys.stderr.write( | |
115 | "[WARNING] Cannot find file specified as long_description (%s)\n" |
|
115 | "[WARNING] Cannot find file specified as long_description (%s): %s\n" | |
116 | % README_FILE |
|
116 | % (README_FILE, err) | |
117 | ) |
|
117 | ) | |
118 | long_description = description |
|
118 | long_description = description | |
119 |
|
119 |
General Comments 0
You need to be logged in to leave comments.
Login now