File tree Expand file tree Collapse file tree
ElementsExamples/python/ElementsExamples Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ def defineSpecificProgramOptions():
1212
1313
1414def mainMethod (args ):
15- logger = log .getLogger ('PyhtonProgramExample ' )
15+ logger = log .getLogger ('PythonProgramExample ' )
1616
1717 logger .info ('#' )
1818 logger .info ('# Logging from the mainMethod() of the PythonProgramExample ' )
@@ -23,11 +23,11 @@ def mainMethod(args):
2323 logger .info ('# Adding the values of the int list' )
2424 if not args .int_list :
2525 raise Exception ('--int-list parameter missing' )
26- sum = 0
26+ arg_sum = 0
2727 for i in args .int_list :
2828 logger .debug ('Adding %d' , i )
29- sum += i
30- logger .info ('Sum = %d' , sum )
29+ arg_sum += i
30+ logger .info ('Sum = %d' , arg_sum )
3131 except Exception as e :
3232 logger .error ('Something went wrong...' )
3333 logger .exception (e )
Original file line number Diff line number Diff line change 1010
1111def command (cmd , * args , ** kwargs ):
1212 """
13- Simple wrapper to execute a command and return standard output and standard error.
13+ Simple wrapper to execute a command and return standard output and standard
14+ error.
1415 """
1516 d = {"stdout" : PIPE , "stderr" : PIPE }
1617 d .update (kwargs )
@@ -199,7 +200,8 @@ def main():
199200 opts .exclusions .append (os .environ ["CMTCONFIG" ])
200201
201202 # check if we are in the cmt directory before broadcasting
202- if not (os .path .basename (os .getcwd ()) == "cmt" and os .path .exists ("requirements" )):
203+ if not (os .path .basename (os .getcwd ()) == "cmt"
204+ and os .path .exists ("requirements" )):
203205 logging .error (
204206 "This script must be executed from the cmt directory of a package." )
205207 return 1
You can’t perform that action at this time.
0 commit comments