1
0
Fork 0
mirror of https://github.com/shlomif/PySolFC.git synced 2025-04-05 00:02:29 -04:00
This commit is contained in:
Roderik Ploszek 2018-03-19 23:10:24 +01:00
parent a37317c311
commit 0bd7b44ed5

View file

@ -481,7 +481,8 @@ class TokenEater:
timestamp = time.ctime(time.time())
# The time stamp in the header doesn't have the same format as that
# generated by xgettext...
print(pot_header % {'time': timestamp, 'version': __version__}, file=fp)
print(pot_header % {'time': timestamp, 'version': __version__},
file=fp)
# Sort the entries. First sort each particular entry's keys, then
# sort all the entries by their first item.
reverse = {}
@ -512,8 +513,8 @@ class TokenEater:
elif options.locationstyle == options.SOLARIS:
for filename, lineno in v:
d = {'filename': filename, 'lineno': lineno}
print(_(
'# File: %(filename)s, line: %(lineno)d') % d, file=fp)
print(_('# File: %(filename)s, line: %(lineno)d') % d,
file=fp)
elif options.locationstyle == options.GNU:
# fit as many locations on one line, as long as the
# resulting line length doesn't exceeds 'options.width'
@ -652,8 +653,8 @@ def main():
options.toexclude = fp.readlines()
fp.close()
except IOError:
print(_(
"Can't read --exclude-file: %s") % options.excludefilename, file=sys.stderr)
print(_("Can't read --exclude-file: %s") % options.excludefilename,
file=sys.stderr)
sys.exit(1)
else:
options.toexclude = []
@ -688,7 +689,7 @@ def main():
except tokenize.TokenError as e:
print('%s: %s, line %d, column %d' % (
e[0], filename, e[1][0], e[1][1]), file=sys.stderr)
except StopTokenizing:
except tokenize.StopTokenizing:
pass
finally:
if closep: