Skip to content

Commit 856d624

Browse files
wesinatorssbarnea
authored andcommitted
Update attachment example to Python 3 StringIO
1 parent 0cf67df commit 856d624

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/examples.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -340,8 +340,8 @@ Here are some examples::
340340
jira.add_attachment(issue=issue, attachment=f)
341341

342342
# attach file from memory (you can skip IO operations). In this case you MUST provide `filename`.
343-
import StringIO
344-
attachment = StringIO.StringIO()
343+
from io import StringIO
344+
attachment = StringIO()
345345
attachment.write(data)
346346
jira.add_attachment(issue=issue, attachment=attachment, filename='content.txt')
347347

0 commit comments

Comments
 (0)