add Python3 compatibility

pull/1052/head
Alexandre Detiste 1 month ago committed by Alex Willmer
parent 933477fcbe
commit 58235e3675

@ -6,6 +6,7 @@
# - apt-get source libpam0g
# - cd */po/
# - python ~/pogrep.py "Password: "
from __future__ import print_function
import sys
import shlex
@ -31,7 +32,7 @@ for path in glob.glob('*.po'):
if last_word == 'msgid' and word == 'msgstr':
if last_rest == sys.argv[1]:
thing = rest.rstrip(': ').decode('utf-8').lower().encode('utf-8').encode('base64').rstrip()
print ' %-60s # %s' % (repr(thing)+',', path)
print(' %-60s # %s' % (repr(thing)+',', path))
last_word = word
last_rest = rest

Loading…
Cancel
Save