Change several python and robot files to 110 chars
Taking advantage of current team limit of 110 chars.
Change-Id: If7ab51fe894889967b8c8bb2f2fa4664f01117d5
Signed-off-by: Michael Walsh <micwalsh@us.ibm.com>
diff --git a/bin/validate_plug_ins.py b/bin/validate_plug_ins.py
index 809f17a..13ec687 100755
--- a/bin/validate_plug_ins.py
+++ b/bin/validate_plug_ins.py
@@ -8,12 +8,11 @@
import os
-# python puts the program's directory path in sys.path[0]. In other words,
-# the user ordinarily has no way to override python's choice of a module from
-# its own dir. We want to have that ability in our environment. However, we
-# don't want to break any established python modules that depend on this
-# behavior. So, we'll save the value from sys.path[0], delete it, import our
-# modules and then restore sys.path to its original value.
+# python puts the program's directory path in sys.path[0]. In other words, the user ordinarily has no way
+# to override python's choice of a module from its own dir. We want to have that ability in our environment.
+# However, we don't want to break any established python modules that depend on this behavior. So, we'll
+# save the value from sys.path[0], delete it, import our modules and then restore sys.path to its original
+# value.
save_path_0 = sys.path[0]
del sys.path[0]
@@ -49,17 +48,15 @@
default="obmc",
help=mch_class_help_text + default_string)
-# The stock_list will be passed to gen_get_options. We populate it with the
-# names of stock parm options we want. These stock parms are pre-defined by
-# gen_get_options.
+# The stock_list will be passed to gen_get_options. We populate it with the names of stock parm options we
+# want. These stock parms are pre-defined by gen_get_options.
stock_list = [("test_mode", 0), ("quiet", 1), ("debug", 0)]
def exit_function(signal_number=0,
frame=None):
r"""
- Execute whenever the program ends normally or with the signals that we
- catch (i.e. TERM, INT).
+ Execute whenever the program ends normally or with the signals that we catch (i.e. TERM, INT).
"""
dprint_executing()
@@ -70,18 +67,16 @@
def signal_handler(signal_number, frame):
r"""
- Handle signals. Without a function to catch a SIGTERM or SIGINT, our
- program would terminate immediately with return code 143 and without
- calling our exit_function.
+ Handle signals. Without a function to catch a SIGTERM or SIGINT, our program would terminate immediately
+ with return code 143 and without calling our exit_function.
"""
- # Our convention is to set up exit_function with atexit.registr() so
- # there is no need to explicitly call exit_function from here.
+ # Our convention is to set up exit_function with atexit.registr() so there is no need to explicitly call
+ # exit_function from here.
dprint_executing()
- # Calling exit prevents us from returning to the code that was running
- # when we received the signal.
+ # Calling exit prevents us from returning to the code that was running when we received the signal.
exit(0)
@@ -97,13 +92,12 @@
def main():
r"""
- This is the "main" function. The advantage of having this function vs
- just doing this in the true mainline is that you can:
+ This is the "main" function. The advantage of having this function vs just doing this in the true
+ mainline is that you can:
- Declare local variables
- Use "return" instead of "exit".
- Indent 4 chars like you would in any function.
- This makes coding more consistent, i.e. it's easy to move code from here
- into a function and vice versa.
+ This makes coding more consistent, i.e. it's easy to move code from here into a function and vice versa.
"""
if not gen_get_options(parser, stock_list):
@@ -122,8 +116,7 @@
mch_class)
qprint_var(plug_in_packages_list)
- # As stated in the help text, this program must print the full paths of
- # each selected plug in.
+ # As stated in the help text, this program must print the full paths of each selected plug in.
for plug_in_dir_path in plug_in_packages_list:
print(plug_in_dir_path)