Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some more python 2to3 fixes for HLT #34583

Merged
merged 1 commit into from Jul 23, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 7 additions & 7 deletions HLTrigger/Configuration/python/Tools/options.py
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
@@ -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
@@ -1,4 +1,4 @@
#! /usr/bin/env python
#! /usr/bin/env python3

import sys
import subprocess
Expand Down