Skip to content

Commit 5bd47d3

Browse files
author
KP
committed
clean up outdated code checking attachment id after upload
1 parent 6d3ee50 commit 5bd47d3

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

shotgun_api3/shotgun.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1012,13 +1012,8 @@ def upload(self, entity_type, entity_id, path, field_name=None,
10121012
"not sure why.\nPath: %s\nUrl: %s\nError: %s" % (
10131013
path, url, str(result)))
10141014

1015-
# TODO:
1016-
# we changed the result string in the middle of 1.8 to return the id
1017-
# remove once everyone is > 1.8.3
1018-
r = str(result).split(":")
1019-
attachment_id = 0
1020-
if len(r) > 1:
1021-
attachment_id = int(str(result).split(":")[1].split("\n")[0])
1015+
attachment_id = int(str(result).split(":")[1].split("\n")[0])
1016+
10221017
return attachment_id
10231018

10241019
def download_attachment(self, attachment_id):

0 commit comments

Comments
 (0)