Repository: dmwm/wmcore
Issue: Typo in FJR attribute name

**Impact of the bug**
WMAgent/CRAB

**Describe the bug**
As mentioned on this commit:
https://github.com/dmwm/CRABServer/commit/a647fa3eb5d728d53f502646bdfc2d582b2abe8e

WMCore is setting, there is a typo in WMCore where the file attr `output_module_class` is set as `ouput_module_class`

**How to reproduce it**
None

**Expected behavior**
We should rename the attribute to `output_module_class`, here:
https://github.com/dmwm/WMCore/blob/master/src/python/WMCore/FwkJobReport/XMLParser.py#L96

and fix whatever unit tests need to be fixed.

**Additional context and error message**
none

Changed files:
src/python/WMCore/FwkJobReport/XMLParser.py, src/python/WMCore/Services/WMArchive/DataMap.py, src/python/WMCore/WMSpec/StdSpecs/StepChain.py

diff --git a/src/python/WMCore/FwkJobReport/XMLParser.py b/src/python/WMCore/FwkJobReport/XMLParser.py
index bcb2eb567..3da9bc113 100644
--- a/src/python/WMCore/FwkJobReport/XMLParser.py
+++ b/src/python/WMCore/FwkJobReport/XMLParser.py
@@ -76,7 +76,6 @@ def fileHandler(targets):
         moduleNode = [x for x in node.children if x.name == "ModuleLabel"][0]
         moduleName = moduleNode.text
 
-        moduleRef = report.addOutputModule(moduleName)
         fileRef = report.addOutputFile(moduleName)
         fileAttrs = {}
         for subnode in node.children:
@@ -93,12 +92,10 @@ def fileHandler(targets):
                                    pfn=fileAttrs["PFN"], catalog=fileAttrs["Catalog"],
                                    module_label=fileAttrs["ModuleLabel"],
                                    guid=fileAttrs["GUID"],
-                                   ouput_module_class=fileAttrs["OutputModuleClass"],
+                                   output_module_class=fileAttrs["OutputModuleClass"],
                                    events=int(fileAttrs["TotalEvents"]),
                                    branch_hash=fileAttrs["BranchHash"])
 
-        [fileRef]
-
 
 @coroutine
 def inputFileHandler(targets):
@@ -115,7 +112,6 @@ def inputFileHandler(targets):
         moduleNode = [x for x in node.children if x.name == "ModuleLabel"][0]
         moduleName = moduleNode.text
 
-        moduleRef = report.addInputSource(moduleName)
         fileRef = report.addInputFile(moduleName)
         fileAttrs = {}
         for subnode in node.children:
@@ -133,8 +129,6 @@ def inputFileHandler(targets):
                                    input_source_class=fileAttrs["InputSourceClass"],
                                    events=int(fileAttrs["EventsRead"]))
 
-        [fileRef]
-
 
 @coroutine
 def analysisFileHandler(targets):
@@ -200,8 +194,10 @@ def skippedEventHandler():
         report, node = (yield)
         run = node.attrs.get("Run", None)
         event = node.attrs.get("Event", None)
-        if run == None: continue
-        if event == None: continue
+        if run is None:
+            continue
+        if event is None:
+            continue
         report.addSkippedEvent(run, event)
 
 
@@ -250,7 +246,6 @@ def runHandler():
 
                 Report.addRunInfoToFile(fileSection, runInfo)
 
-
 @coroutine
 def branchHandler():
     """
@@ -295,8 +290,8 @@ def inputAssocHandler():
         fileSection, node = (yield)
         for inputnode in node.children:
             data = {}
-            [data.__setitem__(subnode.name, subnode.text)
-             for subnode in inputnode.children]
+            for subnode in inputnode.children:
+                data.__setitem__(subnode.name, subnode.text)
             Report.addInputToFile(fileSection, data["LFN"], data['PFN'])
 
 
@@ -339,7 +334,8 @@ def perfSummaryHandler():
     while True:
         report, node = (yield)
         summary = node.attrs.get('Metric', None)
-        if summary == None: continue
+        if summary is None:
+            continue
         # Add performance section if it doesn't exist
         if not hasattr(report, summary):
             report.section_(summary)
@@ -444,8 +440,8 @@ def perfStoreHandler():
 
         # Then assemble the information
         # Calculate the values
-        logging.debug("ReadMethod: %s" % readMethod)
-        logging.debug("WriteMethod: %s" % writeMethod)
+        logging.debug("ReadMethod: %s", readMethod)
+        logging.debug("WriteMethod: %s", writeMethod)
         try:
             readTotalMB = storageValues.get("Timing-%s-read-totalMegabytes" % readMethod, 0) \\
                           + storageValues.get("Timing-%s-readv-totalMegabytes" % readMethod, 0)
diff --git a/src/python/WMCore/Services/WMArchive/DataMap.py b/src/python/WMCore/Services/WMArchive/DataMap.py
index 6112c0dba..ac6d2ae74 100644
--- a/src/python/WMCore/Services/WMArchive/DataMap.py
+++ b/src/python/WMCore/Services/WMArchive/DataMap.py
@@ -97,7 +97,7 @@ STEP_DEFAULT = { #'name': '',
                          #'location': '',
                          #'merged': False,
                          #'module_label': '',
-                         #'ouput_module_class': '',
+                         #'output_module_class': '',
                          #'outputDataset': '',
                          'outputLFNs': [],
                          'outputPFNs': [],
diff --git a/src/python/WMCore/WMSpec/StdSpecs/StepChain.py b/src/python/WMCore/WMSpec/StdSpecs/StepChain.py
index 0144a4f8b..f596c28e2 100644
--- a/src/python/WMCore/WMSpec/StdSpecs/StepChain.py
+++ b/src/python/WMCore/WMSpec/StdSpecs/StepChain.py
@@ -181,12 +181,12 @@ class StepChainWorkloadFactory(StdBase):
                 self.stepParentageMapping[stepName]['ParentStepCmsRun'] = parentStepCmsRun
 
                 parentOutputModName = origArgs[stepNumber]["InputFromOutputModule"]
-                parentDset = self.findParentStepWithOuputDataset(origArgs, parentStepNumber, parentStepName, parentOutputModName)
+                parentDset = self.findParentStepWithOutputDataset(origArgs, parentStepNumber, parentStepName, parentOutputModName)
                 self.stepParentageMapping[stepName]['ParentDataset'] = parentDset
 
-    def findParentStepWithOuputDataset(self, origArgs, stepNumber, stepName, outModName):
+    def findParentStepWithOutputDataset(self, origArgs, stepNumber, stepName, outModName):
         """
-        _findParentStepWithOuputDataset_
+        _findParentStepWithOutputDataset_
         Given the parent step name and output module name, finds the parent dataset 
         :param origArgs: request arguments
         :param stepNumber: step number of the parent step
@@ -202,7 +202,7 @@ class StepChainWorkloadFactory(StdBase):
             parentStepName = self.stepParentageMapping[stepName]['ParentStepName']
             if parentStepNumber:
                 parentOutputModName = origArgs[stepNumber]["InputFromOutputModule"]
-                return self.findParentStepWithOuputDataset(origArgs, parentStepNumber, parentStepName, parentOutputModName)
+                return self.findParentStepWithOutputDataset(origArgs, parentStepNumber, parentStepName, parentOutputModName)
             else:
                 # this is Step1, return the InputDataset if any
                 return origArgs[stepNumber].get("InputDataset")