##// END OF EJS Templates
lazy load pygments lib so we can use VCS without it installed
marcink -
r3876:c5dd289c beta
parent child Browse files
Show More
@@ -13,8 +13,6 b' import stat'
13 13 import posixpath
14 14 import mimetypes
15 15
16 from pygments import lexers
17
18 16 from rhodecode.lib.vcs.backends.base import EmptyChangeset
19 17 from rhodecode.lib.vcs.exceptions import NodeError, RemovedFileNodeError
20 18 from rhodecode.lib.vcs.utils.lazy import LazyProperty
@@ -360,7 +358,7 b' class FileNode(Node):'
360 358 Returns pygment's lexer class. Would try to guess lexer taking file's
361 359 content, name and mimetype.
362 360 """
363
361 from pygments import lexers
364 362 try:
365 363 lexer = lexers.guess_lexer_for_filename(self.name, self.content, stripnl=False)
366 364 except lexers.ClassNotFound:
General Comments 0
You need to be logged in to leave comments. Login now