Permalink
Browse files

If pygments is already installed on the system - don't complain, just…

… use it.
  • Loading branch information...
1 parent b3e042f commit e493ce4764902df3c07e7872ed56a4f2e30e1aff @omarqureshi omarqureshi committed May 12, 2011
Showing with 8 additions and 4 deletions.
  1. +8 −4 vendor/pygments/plugin.py
View
@@ -35,10 +35,14 @@
:copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
-try:
- import pkg_resources
-except ImportError:
- pkg_resources = None
+import warnings
+
+with warnings.catch_warnings():
+ warnings.simplefilter("ignore")
+ try:
+ import pkg_resources
+ except ImportError:
+ pkg_resources = None
LEXER_ENTRY_POINT = 'pygments.lexers'
FORMATTER_ENTRY_POINT = 'pygments.formatters'

0 comments on commit e493ce4

Please sign in to comment.