diff hgext/mq.py @ 35958:e35616bb6ede

py3: use open() instead of file() file() is not present in Python 3 Differential Revision: https://phab.mercurial-scm.org/D2044
author Pulkit Goyal <7895pulkit@gmail.com>
date Mon, 05 Feb 2018 13:12:36 +0530
parents d41e41d11574
children f87641bf4d23
line wrap: on
line diff
--- a/hgext/mq.py	Mon Feb 05 13:12:01 2018 +0530
+++ b/hgext/mq.py	Mon Feb 05 13:12:36 2018 +0530
@@ -281,7 +281,7 @@
         nodeid = None
         diffstart = 0
 
-        for line in file(pf):
+        for line in open(pf, 'rb'):
             line = line.rstrip()
             if (line.startswith('diff --git')
                 or (diffstart and line.startswith('+++ '))):