hgext/patchbomb.py
changeset 30635 a150173da1c1
parent 30407 e1677cc29da6
child 30838 eb78ec9e97b7
--- 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)