Search Exchange
Search All Sites
Nagios Live Webinars
Let our experts show you how Nagios can help your organization.Login
Directory Tree
Directory
atrox
To get rid of the deprecation warnings:
--- check_smartmon.py.orig 2011-03-15 15:28:50.000000000 +0200
+++ check_smartmon.py 2011-03-15 15:40:48.000000000 +0200
@@ -28,6 +28,7 @@
import os.path
import sys
+import warnings
from optparse import OptionParser
@@ -111,6 +112,8 @@
# get health status
cmd = "%s -H %s" % (path, device)
vprint(3, "Get device health status: %s" % cmd)
+ # filter out deprecation warnings
+ warnings.filterwarnings('ignore', category=DeprecationWarning, message=r'os\.popen3')
(child_stdin, child_stdout, child_stderr) = os.popen3(cmd)
line = child_stderr.readline()
if len(line):
--- check_smartmon.py.orig 2011-03-15 15:28:50.000000000 +0200
+++ check_smartmon.py 2011-03-15 15:40:48.000000000 +0200
@@ -28,6 +28,7 @@
import os.path
import sys
+import warnings
from optparse import OptionParser
@@ -111,6 +112,8 @@
# get health status
cmd = "%s -H %s" % (path, device)
vprint(3, "Get device health status: %s" % cmd)
+ # filter out deprecation warnings
+ warnings.filterwarnings('ignore', category=DeprecationWarning, message=r'os\.popen3')
(child_stdin, child_stdout, child_stderr) = os.popen3(cmd)
line = child_stderr.readline()
if len(line):