Mercurial > public > mercurial-scm > hg-stable
diff contrib/check-config.py @ 28352:a92ee4d8a574
check-config: use absolute_import and print_function
author | Pulkit Goyal <7895pulkit@gmail.com> |
---|---|
date | Sun, 06 Mar 2016 03:01:46 +0530 |
parents | 8f244b75cc5e |
children | e5a6a540ae63 |
line wrap: on
line diff
--- a/contrib/check-config.py Sun Mar 06 02:25:50 2016 +0530 +++ b/contrib/check-config.py Sun Mar 06 03:01:46 2016 +0530 @@ -7,6 +7,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +from __future__ import absolute_import, print_function import re import sys @@ -82,9 +83,9 @@ if re.match('[a-z.]+$', default): default = '<variable>' if name in foundopts and (ctype, default) != foundopts[name]: - print l - print "conflict on %s: %r != %r" % (name, (ctype, default), - foundopts[name]) + print(l) + print("conflict on %s: %r != %r" % (name, (ctype, default), + foundopts[name])) foundopts[name] = (ctype, default) carryover = '' else: @@ -102,7 +103,7 @@ ctype, default = foundopts[name] if default: default = ' [%s]' % default - print "undocumented: %s (%s)%s" % (name, ctype, default) + print("undocumented: %s (%s)%s" % (name, ctype, default)) if __name__ == "__main__": if len(sys.argv) > 1: