Skip to content

Commit

Permalink
Fix logviewer issue on invalid type (#1494)
Browse files Browse the repository at this point in the history
Current logic would fail with `str has no attribute append` when a log
editor is configured using cuegui.yaml
  • Loading branch information
DiegoTavares authored Aug 28, 2024
1 parent 0e4cee0 commit 87394e6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
5 changes: 3 additions & 2 deletions cuegui/cuegui/FrameMonitorTree.py
Original file line number Diff line number Diff line change
Expand Up @@ -387,9 +387,10 @@ def __setJob(self, job):
@type job: job, string, None"""
self.frameSearch = opencue.search.FrameSearch()
self.__job = job
self.__jobState = job.state()
self.removeAllItems()
self.__sortByColumnLoad()
if job:
self.__jobState = job.state()
self.__sortByColumnLoad()
self._lastUpdate = 0
self.job_changed.emit()

Expand Down
7 changes: 5 additions & 2 deletions cuegui/cuegui/Utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -487,8 +487,11 @@ def popupView(file, facility=None):
app = cuegui.app()
if editor_from_env:
job_log_cmd = editor_from_env.split()
elif app.settings.contains('LogEditor'):
job_log_cmd = app.settings.value("LogEditor")
elif app.settings.contains('LogEditor') and (
len(app.settings.value("LogEditor").strip()) > 0):
job_log_cmd = app.settings.value("LogEditor").split()
if not isinstance(job_log_cmd, list):
job_log_cmd = job_log_cmd.split()
else:
job_log_cmd = cuegui.Constants.DEFAULT_EDITOR.split()
job_log_cmd.append(str(file))
Expand Down

0 comments on commit 87394e6

Please sign in to comment.