diff options
Diffstat (limited to 'devscripts/make_contributing.py')
| -rwxr-xr-x | devscripts/make_contributing.py | 9 | 
1 files changed, 4 insertions, 5 deletions
| diff --git a/devscripts/make_contributing.py b/devscripts/make_contributing.py index 226d1a5d6..5a9eb194f 100755 --- a/devscripts/make_contributing.py +++ b/devscripts/make_contributing.py @@ -1,10 +1,11 @@  #!/usr/bin/env python  from __future__ import unicode_literals -import io  import optparse  import re +from utils import read_file, write_file +  def main():      parser = optparse.OptionParser(usage='%prog INFILE OUTFILE') @@ -14,8 +15,7 @@ def main():      infile, outfile = args -    with io.open(infile, encoding='utf-8') as inf: -        readme = inf.read() +    readme = read_file(infile)      bug_text = re.search(          r'(?s)#\s*BUGS\s*[^\n]*\s*(.*?)#\s*COPYRIGHT', readme).group(1) @@ -25,8 +25,7 @@ def main():      out = bug_text + dev_text -    with io.open(outfile, 'w', encoding='utf-8') as outf: -        outf.write(out) +    write_file(outfile, out)  if __name__ == '__main__': | 
