Skip to content

Commit 9964ea2

Browse files
authored
SG-41525 Fix LoaderActionManager._execute_hook (#131)
1 parent 00085dd commit 9964ea2

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

python/tk_multi_loader/loader_action_manager.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,11 @@
88
# agreement to the Shotgun Pipeline Toolkit Source Code License. All rights
99
# not expressly granted therein are reserved by Shotgun Software Inc.
1010

11-
import sgtk
11+
import functools
1212
import os
1313
import sys
14+
15+
import sgtk
1416
from sgtk.platform.qt import QtCore, QtGui
1517
from sgtk.util import login
1618

@@ -100,10 +102,9 @@ def get_actions_for_publishes(self, sg_data_list, ui_area):
100102

101103
# Bind all the action params to a single invocation of the _execute_hook.
102104
a.triggered[()].connect(
103-
lambda qt_action=a, actions=actions: self._execute_hook(
104-
qt_action, actions
105-
)
105+
functools.partial(self._execute_hook, qt_action=a, actions=actions)
106106
)
107+
107108
a.setData(actions)
108109
qt_actions.append(a)
109110

@@ -185,10 +186,9 @@ def get_actions_for_folder(self, sg_data):
185186

186187
# Bind all the action params to a single invocation of the _execute_hook.
187188
a.triggered[()].connect(
188-
lambda qt_action=a, actions=actions: self._execute_hook(
189-
qt_action, actions
190-
)
189+
functools.partial(self._execute_hook, qt_action=a, actions=actions)
191190
)
191+
192192
a.setData(actions)
193193
qt_actions.append(a)
194194

0 commit comments

Comments
 (0)