pager: rename variables of backup fds
authorYuya Nishihara <yuya@tcha.org>
Sat, 03 Oct 2015 18:48:21 +0900
changeset 26453 1a2578418689
parent 26452 499d5c98e98b
child 26454 62c5e937f477
pager: rename variables of backup fds The next patch will add backup file objects, so the original variable names would be confusing.
hgext/pager.py
--- a/hgext/pager.py	Sat Oct 03 15:02:52 2015 +0900
+++ b/hgext/pager.py	Sat Oct 03 18:48:21 2015 +0900
@@ -70,8 +70,8 @@
                              close_fds=util.closefds, stdin=subprocess.PIPE,
                              stdout=sys.stdout, stderr=sys.stderr)
 
-    stdout = os.dup(sys.stdout.fileno())
-    stderr = os.dup(sys.stderr.fileno())
+    stdoutfd = os.dup(sys.stdout.fileno())
+    stderrfd = os.dup(sys.stderr.fileno())
     os.dup2(pager.stdin.fileno(), sys.stdout.fileno())
     if ui._isatty(sys.stderr):
         os.dup2(pager.stdin.fileno(), sys.stderr.fileno())
@@ -81,8 +81,8 @@
         if util.safehasattr(signal, "SIGINT"):
             signal.signal(signal.SIGINT, signal.SIG_IGN)
         pager.stdin.close()
-        os.dup2(stdout, sys.stdout.fileno())
-        os.dup2(stderr, sys.stderr.fileno())
+        os.dup2(stdoutfd, sys.stdout.fileno())
+        os.dup2(stderrfd, sys.stderr.fileno())
         pager.wait()
 
 def uisetup(ui):