Skip to content

Commit aaf2079

Browse files
committed
fix: have correct type check
1 parent 9d70d2e commit aaf2079

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sw360/attachments.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ def _upload_resource_attachment(self, resource_type: str, resource_id: str, uplo
202202
if resource_type not in ("releases", "components", "projects"):
203203
raise SW360Error(message="Invalid resource type provided!")
204204

205-
if (type(resource_id) is not str) or (resource_id == ""):
205+
if (not isinstance(resource_id, str)) or (resource_id == ""):
206206
raise SW360Error(message="Invalid resource id provided!")
207207

208208
filename = os.path.basename(upload_file)

0 commit comments

Comments
 (0)