ignore annoying warnings about pygments already being imported and stuff being added to python path stable
authorAlexandre Fayolle <alexandre.fayolle@logilab.fr>
Fri, 30 Apr 2010 19:58:17 +0200
branchstable
changeset 5451 7b2e9f774028
parent 5450 269dcd14b92c
child 5456 d040889fac4e
ignore annoying warnings about pygments already being imported and stuff being added to python path
__init__.py
--- a/__init__.py	Fri Apr 30 19:07:06 2010 +0200
+++ b/__init__.py	Fri Apr 30 19:58:17 2010 +0200
@@ -21,6 +21,13 @@
 """
 __docformat__ = "restructuredtext en"
 
+# ignore the pygments UserWarnings
+import warnings
+warnings.filterwarnings('ignore', category=UserWarning,
+                        message='.*was already imported',
+                        module='.*pygments')
+
+
 import __builtin__
 # '_' is available in builtins to mark internationalized string but should
 # not be used to do the actual translation