Skip to content

Commit

Permalink
[cuegui] Fix output viewer cmd format (#1498)
Browse files Browse the repository at this point in the history
The output cmd call was not handling well all types of cmd formats. The
cmd string needs to be passed as an array to be properly interpreted by
the subprocess.
  • Loading branch information
DiegoTavares authored Sep 6, 2024
1 parent e67a8b3 commit ee1cc81
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions cuegui/cuegui/MenuActions.py
Original file line number Diff line number Diff line change
Expand Up @@ -1215,7 +1215,7 @@ def eat(self, rpcObjects=None):
def kill(self, rpcObjects=None):
names = [frame.data.name for frame in self._getOnlyFrameObjects(rpcObjects)]
if names:
if not cuegui.Utils.isPermissible(self._getSource(), self):
if not cuegui.Utils.isPermissible(self._getSource()):
cuegui.Utils.showErrorMessageBox(
AbstractActions.USER_INTERACTION_PERMISSIONS.format(
"kill frames",
Expand Down Expand Up @@ -1331,7 +1331,7 @@ def eatandmarkdone(self, rpcObjects=None):
if frames:
frameNames = [frame.data.name for frame in frames]
#check permissions
if not cuegui.Utils.isPermissible(self._getSource(), self):
if not cuegui.Utils.isPermissible(self._getSource()):
cuegui.Utils.showErrorMessageBox(
AbstractActions.USER_INTERACTION_PERMISSIONS.format(
"eat and mark done frames",
Expand Down
3 changes: 1 addition & 2 deletions cuegui/cuegui/Utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -644,10 +644,9 @@ def launchViewerUsingPaths(paths, test_mode=False):
# Launch viewer and inform user
msg = 'Launching viewer: {0}'.format(cmd)
if not test_mode:
QtGui.qApp.emit(QtCore.SIGNAL('status(PyQt_PyObject)'), msg)
print(msg)
try:
subprocess.check_call(cmd)
subprocess.check_call(cmd.split())
except subprocess.CalledProcessError as e:
showErrorMessageBox(str(e), title='Error running Viewer command')
except Exception as e:
Expand Down

0 comments on commit ee1cc81

Please sign in to comment.