295 except OSError as v: |
295 except OSError as v: |
296 sys.stderr.write("{0} error: {1}\n".format(outputFile, v[1])) |
296 sys.stderr.write("{0} error: {1}\n".format(outputFile, v[1])) |
297 sys.exit(3) |
297 sys.exit(3) |
298 try: |
298 try: |
299 with open(basesFile, "w", encoding="utf-8", newline=newline) as out: |
299 with open(basesFile, "w", encoding="utf-8", newline=newline) as out: |
300 for baseEntry in sorted(basesDict.keys()): |
300 for baseEntry in sorted(basesDict): |
301 out.write( |
301 out.write( |
302 "{0} {1}\n".format( |
302 "{0} {1}\n".format( |
303 baseEntry, " ".join(sorted(basesDict[baseEntry])) |
303 baseEntry, " ".join(sorted(basesDict[baseEntry])) |
304 ) |
304 ) |
305 ) |
305 ) |