Repository: dmwm/wmcore
Issue: Python2.6 incompatibility in the Configuration module (loading with CMSSW python) 

**Impact of the bug**
WMAgent

**Describe the bug**
While validating 1.3.6.patch2, there is this old workflow using `slc5_amd64_gcc462` and a python2.6 release:
amaltaro_ReRecoSkim_Agent136_Val_200711_123408_805

it failed while applying the PSet tweaks, with:
```
AttributeError: 'tuple' object has no attribute 'major'
```

**How to reproduce it**
Run the same workflow template

**Expected behavior**
The Configuration module needs to be compatible with python 2.6, 2.7 and 3+, otherwise jobs might fail during runtime.
There might be a longer term fix coming in the next months, when the PSet tweak will be an external tool (outside of WMCore)...

**Additional context and error message**
Traceback from wmstats:
```
cmsRun1

    SCRAMScriptFailure (Exit Code: 50513)

        SCRAM scripts failed to run!
        <@========== WMException Start ==========@>
        Exception Class: PreScriptScramFailure
        Message: Error running command
        /cvmfs/cms.cern.ch/COMP/slc6_amd64_gcc493/external/python/2.7.13/bin/python2 -m WMCore.WMRuntime.ScriptInvoke WMTaskSpace.cmsRun1 SetupCMSSWPset 

        5
         
                Scram Command Diagnostic:
                Command : scramv1
                Architecture: slc5_amd64_gcc462
                Executed: /cvmfs/cms.cern.ch/slc5_amd64_gcc462/cms/cmssw-patch/CMSSW_5_3_7_patch5/external/slc5_amd64_gcc462/bin/python2.6 -m WMCore.WMRuntime.ScriptInvoke WMTaskSpace.cmsRun1 SetupCMSSWPset 

                Exit Status: 5
                Stdout: Traceback (most recent call last):
          File "/cvmfs/cms.cern.ch/slc5_amd64_gcc462/external/python/2.6.4/lib/python2.6/runpy.py", line 122, in _run_module_as_main
            "__main__", fname, loader, pkg_name)
          File "/cvmfs/cms.cern.ch/slc5_amd64_gcc462/external/python/2.6.4/lib/python2.6/runpy.py", line 34, in _run_code
            exec code in run_globals
          File "/srv/job/WMCore.zip/WMCore/WMRuntime/ScriptInvoke.py", line 22, in <module>
          File "/srv/job/WMCore.zip/WMCore/WMRuntime/Bootstrap.py", line 18, in <module>
          File "/srv/job/WMCore.zip/WMCore/FwkJobReport/Report.py", line 17, in <module>
          File "/srv/job/WMCore.zip/WMCore/Configuration.py", line 17, in <module>
        AttributeError: 'tuple' object has no attribute 'major'

                Stderr: None 
        	ModuleName : WMCore.WMSpec.Steps.WMExecutionFailure
        	MethodName : __init__
        	ClassInstance : None
        	FileName : /srv/job/WMCore.zip/WMCore/WMSpec/Steps/WMExecutionFailure.py
        	ClassName : None
        	LineNumber : 18
        	ErrorNr : 50513
```

Changed files:
src/python/WMCore/Configuration.py

diff --git a/src/python/WMCore/Configuration.py b/src/python/WMCore/Configuration.py
index 494b228c5..4d8199885 100644
--- a/src/python/WMCore/Configuration.py
+++ b/src/python/WMCore/Configuration.py
@@ -14,7 +14,7 @@ import os
 import sys
 import traceback
 
-PY3 = sys.version_info.major == 3
+PY3 = sys.version_info[0] == 3
 
 # PY3 compatibility (can be removed once python2 gets dropped)
 if PY3: