crecord: don't abort on Windows when curses isn't available
authorMatt Harbison <matt_harbison@yahoo.com>
Fri, 20 Mar 2015 23:35:13 -0400
changeset 24425 3a4122bb9488
parent 24424 f7a3ea7b9dc6
child 24426 8e477ad46692
crecord: don't abort on Windows when curses isn't available This is the hack portion of the previous patch, which can be backed out once we figure out how to deal with curses. Without this, the tests affected by the import problem mentioned in the previous patch fail in exactly the same way, but with the nicer 'module not available' error.
mercurial/crecord.py
--- a/mercurial/crecord.py	Sat Mar 21 01:24:17 2015 -0400
+++ b/mercurial/crecord.py	Fri Mar 20 23:35:13 2015 -0400
@@ -32,8 +32,9 @@
 try:
     curses
 except NameError:
-    raise util.Abort(
-        _('the python curses/wcurses module is not available/installed'))
+    if os.name != 'nt':  # Temporary hack to get running on Windows again
+        raise util.Abort(
+            _('the python curses/wcurses module is not available/installed'))
 
 _origstdout = sys.__stdout__ # used by gethw()