crecord: ensure that curses is False if not imported stable
authorSean Farley <sean@farley.io>
Tue, 15 Dec 2015 16:00:06 -0800
branchstable
changeset 27530 ba30ef5bba95
parent 27529 940cedaee988
child 27531 84d686cb62c4
crecord: ensure that curses is False if not imported This provides no functional change but makes the next two patches easier to review.
mercurial/crecord.py
--- a/mercurial/crecord.py	Tue Dec 15 15:56:10 2015 -0800
+++ b/mercurial/crecord.py	Tue Dec 15 16:00:06 2015 -0800
@@ -43,8 +43,9 @@
         import wcurses as curses
         curses.error
     except ImportError:
-        # wcurses is not shipped on Windows by default
-        pass
+        # wcurses is not shipped on Windows by default, or python is not
+        # compiled with curses
+        curses = False
 
 try:
     curses