Skip to content

Commit

Permalink
Merge pull request #34583 from cms-tsg-storm/HLTpy2to3updates
Browse files Browse the repository at this point in the history
Some more python 2to3 fixes for HLT
  • Loading branch information
cmsbuild authored Jul 23, 2021
2 parents a1a570a + de068d0 commit fb848c1
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
14 changes: 7 additions & 7 deletions HLTrigger/Configuration/python/Tools/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,27 +132,27 @@ def __init__(self):

# convert HLT and L1 menus to a dedicated object representation on the fly
def __setattr__(self, name, value):
if name is 'menu' and not isinstance(value, ConnectionHLTMenu):
if name == 'menu' and not isinstance(value, ConnectionHLTMenu):
# format 'menu' as needed
object.__setattr__(self, name, ConnectionHLTMenu(value))
elif name is 'l1' and not isinstance(value, ConnectionL1TMenu):
elif name == 'l1' and not isinstance(value, ConnectionL1TMenu):
# format '--l1' as needed
object.__setattr__(self, name, ConnectionL1TMenu(value))
elif name is 'l1Xml' and not isinstance(value, ConnectionL1TMenuXml):
elif name == 'l1Xml' and not isinstance(value, ConnectionL1TMenuXml):
# format '--l1Xml' as needed
object.__setattr__(self, name, ConnectionL1TMenuXml(value))
elif name is 'open' and value:
elif name == 'open' and value:
# '--open' implies '--unprescale'
object.__setattr__(self, 'open', True)
object.__setattr__(self, 'prescale', "none")
elif name is 'prescale' and value is not None:
elif name == 'prescale' and value is not None:
# '--open' overrides '--prescale', set the prescale value only if '--open' is not set
if not self.open:
object.__setattr__(self, 'prescale', value)
elif name is 'profiling' and value:
elif name == 'profiling' and value:
# '--profiling'
object.__setattr__(self, 'profiling', True)
elif name is 'timing' and value:
elif name == 'timing' and value:
# '--timing' implies '--profiling'
object.__setattr__(self, 'timing', True)
object.__setattr__(self, 'profiling', True)
Expand Down
2 changes: 1 addition & 1 deletion HLTrigger/Configuration/test/getDatasets.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#! /usr/bin/env python
#! /usr/bin/env python3

import sys
import subprocess
Expand Down
2 changes: 1 addition & 1 deletion HLTrigger/Configuration/test/getEventContent.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#! /usr/bin/env python
#! /usr/bin/env python3

import sys
import subprocess
Expand Down

0 comments on commit fb848c1

Please sign in to comment.