Detabification massive.

darcs-hash:20051018083823-d1718-09c2df38cfb707d3c3679188b9b9a812009f4f7c.gz
This commit is contained in:
bernat 2005-10-18 10:38:23 +02:00
parent 3c54fb2904
commit 37b21339a6
40 changed files with 1473 additions and 1473 deletions

View file

@ -373,21 +373,21 @@ def bilan(DB, dbNames, duree, cur_time, disp_all = 0) :
print printCounters(0, 1) + " | HOST"
print "="*77
for l in liste[0:top10_length] :
# Test si le DNS de la machine existe (donc si la machine est inscrite au crans)
try:
host = socket.gethostbyaddr( l[-1] ) [0]
bad = 0
except socket.error :
host = l[-1]
bad = 1
if not resolve_names :
# On veut l'IP
host = l[-1]
if bad :
host = "NoDNS_" + host
# Test si le DNS de la machine existe (donc si la machine est inscrite au crans)
try:
host = socket.gethostbyaddr( l[-1] ) [0]
bad = 0
except socket.error :
host = l[-1]
bad = 1
if not resolve_names :
# On veut l'IP
host = l[-1]
if bad :
host = "NoDNS_" + host
print printCounters(l)+ (" |%s" % host)
@ -491,14 +491,14 @@ if os.path.isfile(lock_name) :
msg=string.strip(string.join(msg[1:], '') )
q = os.system("ps -o pid,tty,user,etime,command " +pid)
if q==256:
print "PID lock no trouvé => delock"
try :
os.remove(lock_name)
except :
None
print "PID lock no trouvé => delock"
try :
os.remove(lock_name)
except :
None
else :
print "Script lockant en activité, sortie"
sys.exit(255)
print "Script lockant en activité, sortie"
sys.exit(255)
#Locking
lock_fd=open(lock_name, "w")
@ -529,7 +529,7 @@ for [key, val] in optlist :
pickleName=val
if key == '-s' :
store_all = 1
if key == '-n' :
if key == '-n' :
resolve_names = 0
if key == '-T' :
if duree == 0 :
@ -538,7 +538,7 @@ for [key, val] in optlist :
sduree = int( float(val) * 3600 * 24 )
if key == '-c' :
sort_column = int(val) -1
if duree == 0:
duree = 24*3600
if not logFNames :