Browse Source

removed some more exception handling

import/heads/master
Cian Brennan 11 years ago
parent
commit
fd70d50be2
1 changed files with 6 additions and 14 deletions
  1. +6
    -14
      rbusers.py

+ 6
- 14
rbusers.py View File

@@ -61,20 +61,12 @@ for user in logged_users :
else :
try :
group = pwd.getpwnam(user)[3]
try :
if logged_users[user] < 10 :
print format_string_norm % ( groups[group], user.ljust(8),
logged_users[user] ),
else :
print format_string_10 % (groups[group], user.ljust(8),
logged_users[user] ),
except KeyError:
if logged_users[user] < 10 :
print format_string_norm % ( default_colour, user.ljust(8),
logged_users[user] ),
else :
print format_string_10 % ( default_colour, user.ljust(8),
logged_users[user] ),
if logged_users[user] < 10 :
print format_string_norm % ( groups.get(group, default_colour),
user.ljust(8), logged_users[user] ),
else :
print format_string_10 % (groups.get(group, default_colour),
user.ljust(8), logged_users[user] ),
except KeyError:
iter = iter - 1
if iter >= 5 :


Loading…
Cancel
Save