Skip to content

Commit 32ec775

Browse files
author
kbehrman
committed
Merge pull request #14 from shotgunsoftware/attachment_id_cleanup
Attachment id cleanup
2 parents 59a2242 + 8ccbea1 commit 32ec775

1 file changed

Lines changed: 1 addition & 7 deletions

File tree

shotgun_api3/shotgun.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1026,13 +1026,7 @@ def upload(self, entity_type, entity_id, path, field_name=None,
10261026
"not sure why.\nPath: %s\nUrl: %s\nError: %s" % (
10271027
path, url, str(result)))
10281028

1029-
# TODO:
1030-
# we changed the result string in the middle of 1.8 to return the id
1031-
# remove once everyone is > 1.8.3
1032-
r = str(result).split(":")
1033-
attachment_id = 0
1034-
if len(r) > 1:
1035-
attachment_id = int(str(result).split(":")[1].split("\n")[0])
1029+
attachment_id = int(str(result).split(":")[1].split("\n")[0])
10361030
return attachment_id
10371031

10381032
def download_attachment(self, attachment_id):

0 commit comments

Comments
 (0)