Skip to content

Commit dbd9505

Browse files
Removed python2 try/except sgutils block (#202)
1 parent 10c600c commit dbd9505

File tree

2 files changed

+2
-14
lines changed

2 files changed

+2
-14
lines changed

hooks/upload_version.py

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,6 @@
1212
import pprint
1313
import sgtk
1414

15-
try:
16-
from tank_vendor import sgutils
17-
except ImportError:
18-
from tank_vendor import six as sgutils
19-
2015
HookBaseClass = sgtk.get_hook_baseclass()
2116

2217

@@ -306,10 +301,8 @@ def publish(self, settings, item):
306301
if settings["Upload"].value:
307302
self.logger.info("Uploading content...")
308303

309-
# on windows, ensure the path is utf-8 encoded to avoid issues with
310-
# the shotgun api
311304
if sgtk.util.is_windows():
312-
upload_path = sgutils.ensure_text(path)
305+
upload_path = str(path)
313306
else:
314307
upload_path = path
315308

python/tk_multi_publish2/dialog.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,6 @@
1313
import sgtk
1414
from sgtk.platform.qt import QtCore, QtGui
1515

16-
try:
17-
from tank_vendor import sgutils
18-
except ImportError:
19-
from tank_vendor import six as sgutils
20-
2116
from .api import PublishManager, PublishItem, PublishTask
2217
from .ui.dialog import Ui_Dialog
2318
from .progress import ProgressHandler
@@ -905,7 +900,7 @@ def _on_drop(self, files):
905900
self._progress_handler.push("Processing external files...")
906901

907902
# pyside gives us back unicode. Make sure we convert it to strings
908-
str_files = [sgutils.ensure_str(f) for f in files]
903+
str_files = [str(f) for f in files]
909904

910905
try:
911906
self.ui.main_stack.setCurrentIndex(self.PUBLISH_SCREEN)

0 commit comments

Comments
 (0)