# HG changeset patch # User Steve Losh # Date 1476031042 0 # Node ID ddd4a3af16d7f9db13688b646bd51624db8551a2 # Parent 1d79df25277b7b65f5a5ab6a3d1ec7a1514d2666 Fix for Python 3 again diff -r 1d79df25277b -r ddd4a3af16d7 t.py --- a/t.py Sun Oct 09 16:33:47 2016 +0000 +++ b/t.py Sun Oct 09 16:37:22 2016 +0000 @@ -2,7 +2,7 @@ """t is for people that want do things, not organize their tasks.""" -from __future__ import with_statement +from __future__ import with_statement, print_function import os, re, sys, hashlib from operator import itemgetter @@ -229,7 +229,7 @@ for _, task in sorted(tasks.items()): if grep.lower() in task['text'].lower(): p = '%s - ' % task[label].ljust(plen) if not quiet else '' - print (p + task['text']) + print(p + task['text']) def write(self, delete_if_empty=False): """Flush the finished and unfinished tasks to the files on disk.""" @@ -322,7 +322,7 @@ except UnknownPrefix: e = sys.exc_info()[1] sys.stderr.write('The ID "%s" does not match any task.\n' % e.prefix) - except BadFile, e: + except BadFile as e: sys.stderr.write('%s - %s\n' % (e.problem, e.path))