Skip to content

Commit

Permalink
[#367] Fixed an unnecessary warning in `DisplayCAL.wxProfileInfo.Prof…
Browse files Browse the repository at this point in the history
…ileFrame.LoadProfile()`.
  • Loading branch information
eoyilmaz committed Oct 9, 2024
1 parent 99a0004 commit d43d95f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
5 changes: 2 additions & 3 deletions DisplayCAL/wxProfileInfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -1459,9 +1459,8 @@ def LoadProfile(self, profile, reset=True):
)
for key, name, _volume in gamuts:
try:
gamut_coverage = float(
profile.tags.meta.getvalue(f"GAMUT_coverage({key})")
)
gamut_coverage = profile.tags.meta.getvalue(f"GAMUT_coverage({key})")
gamut_coverage = float(gamut_coverage) if gamut_coverage is not None else gamut_coverage
except (TypeError, ValueError):
traceback.print_exc()
gamut_coverage = None
Expand Down
9 changes: 4 additions & 5 deletions DisplayCAL/wxwindows.py
Original file line number Diff line number Diff line change
Expand Up @@ -2015,19 +2015,18 @@ def send_command(self, scripting_host_name_suffix, command):
if response == scripting_host:
conn.send_command(command)
response = conn.get_single_response()
print("%s %s returned" % (scripting_host, command), response)
print(f"{scripting_host} {command} returned", response)
else:
print(
"Warning - %s not running "
"under expected port" % scripting_host,
f"Warning - {scripting_host} not running under expected port",
port,
)
del conn
return response
else:
print("Warning - %s not running?" % scripting_host)
print(f"Warning - {scripting_host} not running?")
except Exception as exception:
print("Warning - couldn't talk to %s:" % scripting_host, exception)
print(f"Warning - couldn't talk to {scripting_host}:", exception)
return exception

def focus_handler(self, event=None):
Expand Down

0 comments on commit d43d95f

Please sign in to comment.