summaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
authorFabio Rueda <fabio@vizzuality.com>2013-02-27 17:11:47 (GMT)
committerFabio Rueda <fabio@vizzuality.com>2013-02-27 17:11:47 (GMT)
commit0ac1a30e7a48acfaa2ffb55a443bd66a497a13ac (patch)
tree745446a63ed6a4571605bc503b91389d729dfcf1 /contrib
parent5fce5ceaeb316a1701c49a9c966d60b602101ed9 (diff)
downloadmonitoring-plugins-0ac1a30e7a48acfaa2ffb55a443bd66a497a13ac.tar.gz
ported use whrandom to random
Diffstat (limited to 'contrib')
-rw-r--r--contrib/check_nmap.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/contrib/check_nmap.py b/contrib/check_nmap.py
index 07f6d7f..b7a8738 100644
--- a/contrib/check_nmap.py
+++ b/contrib/check_nmap.py
@@ -43,7 +43,7 @@ _version_ = '1.21'
43# 0.20 2000-07-10 jaclu Initial release 43# 0.20 2000-07-10 jaclu Initial release
44 44
45 45
46import sys, os, string, whrandom 46import sys, os, string, random
47 47
48import tempfile 48import tempfile
49from getopt import getopt 49from getopt import getopt
@@ -207,7 +207,7 @@ class CheckNmap:
207 # _if_ two processes in deed get the same tmp-file 207 # _if_ two processes in deed get the same tmp-file
208 # the only result is a normal error message to nagios 208 # the only result is a normal error message to nagios
209 # 209 #
210 r=whrandom.whrandom() 210 r=random.random()
211 self.tmp_file=tempfile.mktemp('.%s')%r.randint(0,100000) 211 self.tmp_file=tempfile.mktemp('.%s')%r.randint(0,100000)
212 if self.debug: 212 if self.debug:
213 print 'Tmpfile is: %s'%self.tmp_file 213 print 'Tmpfile is: %s'%self.tmp_file
@@ -388,7 +388,7 @@ Version: %s""" % _version_
388 388
389def doc_syntax(): 389def doc_syntax():
390 print """ 390 print """
391Usage: check_ports [-v|--debug] [-H|--host host] [-V|--version] [-h|--help] 391Usage: check_nmap.py [-v|--debug] [-H|--host host] [-V|--version] [-h|--help]
392 [-o|--optional port1,port2,port3 ...] [-r|--range range] 392 [-o|--optional port1,port2,port3 ...] [-r|--range range]
393 [-p|--port port1,port2,port3 ...] [-t|--timeout timeout]""" 393 [-p|--port port1,port2,port3 ...] [-t|--timeout timeout]"""
394 394