changeset 827:a5a339b7fd82

python 3.5
author Jeff Hammel <k0scist@gmail.com>
date Sun, 19 Feb 2017 17:48:52 -0800
parents aa9a3850ed56
children 34e2b07d8cc7
files python/hgrc.py
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/python/hgrc.py	Sun Feb 19 17:25:31 2017 -0800
+++ b/python/hgrc.py	Sun Feb 19 17:48:52 2017 -0800
@@ -169,7 +169,7 @@
     if filter(None, errors.values()):
         for key, value in errors.items():
             if value:
-                print '%s: %s' % (key, ', '.join(value))
+                print ('%s: %s' % (key, ', '.join(value)))
         parser.exit(1)
 
     # construct ConfigParser objects and
@@ -186,7 +186,7 @@
 
     # print the chosen hgrc paths
     if 'list_hgrc' in actions:
-        print '\n'.join(hgrc)
+        print ('\n'.join(hgrc))
 
         # remove from actions list
         actions.pop('list_hgrc', None)
@@ -229,13 +229,13 @@
                 values = [value]
             else:
                 values.append('+++ %s\n%s' % (path, value))
-        print '\n'.join(values)
+        print ('\n'.join(values))
 
     # write .ini files
     for path, ini in config.items():
         if path in urls:
             continue
-        with file(path, 'w') as f:
+        with open(path, 'w') as f:
             ini.write(f)
 
 if __name__ == '__main__':