diff hgext/patchbomb.py @ 30635:a150173da1c1

py3: replace os.environ with encoding.environ (part 2 of 5)
author Pulkit Goyal <7895pulkit@gmail.com>
date Sun, 18 Dec 2016 01:46:39 +0530
parents e1677cc29da6
children eb78ec9e97b7
line wrap: on
line diff
--- a/hgext/patchbomb.py	Sun Dec 18 01:34:41 2016 +0530
+++ b/hgext/patchbomb.py	Sun Dec 18 01:46:39 2016 +0530
@@ -75,6 +75,7 @@
 from mercurial import (
     cmdutil,
     commands,
+    encoding,
     error,
     hg,
     mail,
@@ -693,8 +694,8 @@
         if opts.get('test'):
             ui.status(_('displaying '), subj, ' ...\n')
             ui.flush()
-            if 'PAGER' in os.environ and not ui.plain():
-                fp = util.popen(os.environ['PAGER'], 'w')
+            if 'PAGER' in encoding.environ and not ui.plain():
+                fp = util.popen(encoding.environ['PAGER'], 'w')
             else:
                 fp = ui
             generator = emailmod.Generator.Generator(fp, mangle_from_=False)