[cwctl] don't filter DeprecationWarnings
authorJulien Cristau <julien.cristau@logilab.fr>
Thu, 29 Jan 2015 10:54:41 +0100
changeset 10321 a4af502191d5
parent 10320 facbb38c4c1a
child 10322 d7c33cbdce8b
[cwctl] don't filter DeprecationWarnings
cwctl.py
--- a/cwctl.py	Wed Jan 28 15:53:41 2015 +0100
+++ b/cwctl.py	Thu Jan 29 10:54:41 2015 +0100
@@ -25,7 +25,7 @@
 # possible (for cubicweb-ctl reactivity, necessary for instance for usable bash
 # completion). So import locally in command helpers.
 import sys
-from warnings import warn
+from warnings import warn, filterwarnings
 from os import remove, listdir, system, pathsep
 from os.path import exists, join, isfile, isdir, dirname, abspath
 from urlparse import urlparse
@@ -1133,6 +1133,7 @@
     import os
     sys.stdout = os.fdopen(sys.stdout.fileno(), 'w', 0)
     sys.stderr = os.fdopen(sys.stderr.fileno(), 'w', 0)
+    filterwarnings('default', category=DeprecationWarning)
     cwcfg.load_cwctl_plugins()
     try:
         CWCTL.run(args)