changeset 4803:7549cd526b7f

Fix serve on Windows without win32* modules.
author Nathan Jones <nathanj@insightbb.com>
date Tue, 26 Jun 2007 10:48:58 -0400
parents 3a4310e8fe72
children 7db38bfb307e
files mercurial/util.py mercurial/util_win32.py
diffstat 2 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/util.py	Thu Jul 05 19:11:38 2007 +0200
+++ b/mercurial/util.py	Tue Jun 26 10:48:58 2007 -0400
@@ -968,6 +968,12 @@
                     return p_name_ext
         return default
 
+    def set_signal_handler():
+        try:
+            set_signal_handler_win32()
+        except NameError:
+            pass
+
     try:
         # override functions with win32 versions if possible
         from util_win32 import *
--- a/mercurial/util_win32.py	Thu Jul 05 19:11:38 2007 +0200
+++ b/mercurial/util_win32.py	Tue Jun 26 10:48:58 2007 -0400
@@ -300,7 +300,7 @@
 
 getuser_fallback = win32api.GetUserName
 
-def set_signal_handler():
+def set_signal_handler_win32():
     """Register a termination handler for console events including
     CTRL+C. python signal handlers do not work well with socket
     operations.