Skip to content

Commit

Permalink
Jira: adjust add_attachment method
Browse files Browse the repository at this point in the history
  • Loading branch information
gonchik committed Feb 23, 2023
1 parent e9140e1 commit 827de3d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion atlassian/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.33.0
3.34.0
4 changes: 2 additions & 2 deletions atlassian/jira.py
Original file line number Diff line number Diff line change
Expand Up @@ -1198,13 +1198,13 @@ def add_attachment(self, issue_key, filename):
:param filename: str, name, if file in current directory or full path to file
"""
with open(filename, "rb") as attachment:
return self.add_attachment_object (issue_key, attachment)
return self.add_attachment_object(issue_key, attachment)

def add_attachment_object(self, issue_key, attachment):
"""
Add attachment to Issue
:param issue_key: str
:param attachment: IO object
:param attachment: IO Object
"""
log.warning("Adding attachment...")
base_url = self.resource_url("issue")
Expand Down
3 changes: 3 additions & 0 deletions docs/jira.rst
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,9 @@ Attachments actions
# Add attachment to issue
jira.add_attachment(issue_key, filename)
# Add attachment (IO Object) to issue
jira.add_attachment_object(issue_key, attachment)
Manage components
-----------------

Expand Down

0 comments on commit 827de3d

Please sign in to comment.