@@ -94,9 +94,9 @@ def get_issue_structure(config, issues, version):
9494 # format issue summary to remove backticks
9595 # (necessary for next-gen)
9696
97- issue_summary = issue .fields .summary .encode ( "utf-8" ). replace ('`' , '' )
97+ issue_summary = issue .fields .summary .replace ('`' , '' )
9898
99- issue_pair = (issue .key . encode ( "utf-8" ) , issue_summary )
99+ issue_pair = (issue .key , issue_summary )
100100
101101 if len (components ) == 0 :
102102 # if there isn't a component put this in the last grouping.
@@ -169,11 +169,11 @@ def generate_changelog_rst(config, headings, fixVersion):
169169
170170 if len (issues ) == 1 :
171171 r .content ("{1} {0}" .format (issues [0 ][1 ], r .role (
172- "issue" , issues [0 ][0 ])), wrap = False )
172+ "issue" , issues [0 ][0 ])))
173173 else :
174174 for issue in issues :
175175 r .li ("{1} {0}" .format (issue [1 ], r .role (
176- "issue" , issue [0 ])), wrap = False )
176+ "issue" , issue [0 ])))
177177 r .newline ()
178178
179179 # repeat the above formatting with minor variations to do the nesting.
@@ -190,11 +190,11 @@ def generate_changelog_rst(config, headings, fixVersion):
190190 sub_issues = headings [sub ]
191191 if len (sub_issues ) == 0 :
192192 r .content ("{1} {0}" .format (sub_issues [0 ][1 ].strip (), r .role (
193- "issue" , sub_issues [0 ][0 ])), wrap = False )
193+ "issue" , sub_issues [0 ][0 ])))
194194 else :
195195 for issue in sub_issues :
196196 r .li ("{1} {0}" .format (issue [1 ].strip (), r .role (
197- "issue" , issue [0 ])), wrap = False )
197+ "issue" , issue [0 ])))
198198 r .newline ()
199199
200200 return r
@@ -207,18 +207,19 @@ def write_changelog_file(rst, fixVersion):
207207 fn = fixVersion + ".rst"
208208 outputDir = os .path .join (
209209 sourceDir , "source/includes/changelogs/releases" , fn )
210- rst .write (outputDir )
211- logger .info (
212- "wrote changelog '{0}'. Commit this file independently." .format (outputDir ))
213210
214- print (
215- "wrote changelog '{0}'. Commit this file independently." . format ( outputDir ))
211+ with open ( outputDir , 'w' ) as f :
212+ f . write ( str ( rst ))
216213
214+ logger .info (
215+ "wrote changelog '{0}'. Commit this file independently." .format (outputDir ))
217216
217+ print (
218+ "wrote changelog '{0}'. Commit this file independently." .format (outputDir ))
218219
219220def main ():
220221 # Prompt user for the version to generate the changelog for:
221- fixVersion = raw_input ("Enter changelog version: " )
222+ fixVersion = input ("Enter changelog version: " )
222223
223224 # Get list of JIRA issues to include in changelog
224225 issues = get_jira_issues (fixVersion )
0 commit comments