From 5bd47d32050d26d02a2c89a9ddeefdedce146ec4 Mon Sep 17 00:00:00 2001 From: KP Date: Sun, 29 Jul 2012 11:59:57 -0500 Subject: [PATCH] clean up outdated code checking attachment id after upload --- shotgun_api3/shotgun.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/shotgun_api3/shotgun.py b/shotgun_api3/shotgun.py index bb45453fe..a5492214f 100755 --- a/shotgun_api3/shotgun.py +++ b/shotgun_api3/shotgun.py @@ -1012,13 +1012,8 @@ def upload(self, entity_type, entity_id, path, field_name=None, "not sure why.\nPath: %s\nUrl: %s\nError: %s" % ( path, url, str(result))) - # TODO: - # we changed the result string in the middle of 1.8 to return the id - # remove once everyone is > 1.8.3 - r = str(result).split(":") - attachment_id = 0 - if len(r) > 1: - attachment_id = int(str(result).split(":")[1].split("\n")[0]) + attachment_id = int(str(result).split(":")[1].split("\n")[0]) + return attachment_id def download_attachment(self, attachment_id):