Browse Source

better comments and indentation

bluehood 8 years ago
parent
commit
4431d2f9c1
1 changed files with 6 additions and 10 deletions
  1. 6 10
      whoall

+ 6 - 10
whoall

@@ -5,22 +5,15 @@
 # First author: jacopogh - nov 2006
 # Modified and updated by admins & 150 over time
 #
-# Requires python version 2.7 or above
-# Please read the wiki before editing this file
+# Last modified: March 2016 - blue
 
-# TODO
-# - improve means of separation between lcm1, lcm2, laur
-# - improve handling of options (e.g. "whoall -1 -m" should return
-#   nodes in lcm1 which have mathematica installed)
 
 from time import time
 start = time()
 
-# Import required modules
 import argparse
 import os
 import telnetlib
-import textwrap
 from collections import Counter
 from threading import Thread
 from socket import error
@@ -52,11 +45,13 @@ chucknorris = [ 'agalli', 'ikki', 'buddino', 'alex', 'ema', 'ktf',
                 'blue','silviacotroneo']
 
 
+### ARGUMENT PARSING ###
+# Define parser
 parser = argparse.ArgumentParser(
                     epilog='Please, report bugs or unwanted behavior to: \
-working@lcm.mi.infn.it' )
+                            working@lcm.mi.infn.it' )
 
-## Optional arguments
+# Define optional arguments
 parser.add_argument('-1', '--lcm1', action='store_true', dest='lcm1',
                     help='only display LCM1 hosts ')
 parser.add_argument('-2', '--lcm2', action='store_true', dest='lcm2',
@@ -255,6 +250,7 @@ class Node(Thread):
                 + red + strlgod + normal + pink + strrgod + normal + green \
                 + strlocal + normal + blue + strremote + normal \
                 + turquoise + strchuck + normal
+### end class Node
 
 
 ###################################################