Skip to content

Commit 827de3d

Browse files
committed
Jira: adjust add_attachment method
1 parent e9140e1 commit 827de3d

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

atlassian/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.33.0
1+
3.34.0

atlassian/jira.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1198,13 +1198,13 @@ def add_attachment(self, issue_key, filename):
11981198
:param filename: str, name, if file in current directory or full path to file
11991199
"""
12001200
with open(filename, "rb") as attachment:
1201-
return self.add_attachment_object (issue_key, attachment)
1201+
return self.add_attachment_object(issue_key, attachment)
12021202

12031203
def add_attachment_object(self, issue_key, attachment):
12041204
"""
12051205
Add attachment to Issue
12061206
:param issue_key: str
1207-
:param attachment: IO object
1207+
:param attachment: IO Object
12081208
"""
12091209
log.warning("Adding attachment...")
12101210
base_url = self.resource_url("issue")

docs/jira.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -331,6 +331,9 @@ Attachments actions
331331
# Add attachment to issue
332332
jira.add_attachment(issue_key, filename)
333333
334+
# Add attachment (IO Object) to issue
335+
jira.add_attachment_object(issue_key, attachment)
336+
334337
Manage components
335338
-----------------
336339

0 commit comments

Comments
 (0)