Skip to content

Commit

Permalink
Don't force variables to lowercase in watch window. Only for unsafe c…
Browse files Browse the repository at this point in the history
…md compare
  • Loading branch information
JamesOHeaDLS committed Jan 20, 2025
1 parent 989dc35 commit 3501639
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/dls_pmac_control/watches.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ def addWatch(self):
varName = str(self.lneVariableName.text())
try:
assert isinstance(varName, str)
varName = varName.lower()
if varName in unsafeCommands:
if varName.lower() in unsafeCommands:
raise ValueError(f"{varName} is an unsafe command")
if re.search(r"[\+\-=\^/]", varName) is not None:
raise ValueError(f"{varName} is not a valid variable")
Expand All @@ -46,7 +45,6 @@ def addWatch(self):

# return watch object
def getWatch(self, varName):
varName = varName.lower()
try:
watch = self._watches[varName]
except KeyError as e:
Expand Down

0 comments on commit 3501639

Please sign in to comment.