Update of /cvsroot/pywin32/pywin32/win32/Lib
In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv20331/win32/Lib
Modified Files:
Tag: py3k
win32evtlogutil.py win32rcparser.py win32serviceutil.py
win32timezone.py win32verstamp.py
Log Message:
many more upgrades to py3k syntax
Index: win32verstamp.py
===================================================================
RCS file: /cvsroot/pywin32/pywin32/win32/Lib/win32verstamp.py,v
retrieving revision 1.2
retrieving revision 1.2.4.1
diff -C2 -d -r1.2 -r1.2.4.1
*** win32verstamp.py 23 Oct 2005 11:31:07 -0000 1.2
--- win32verstamp.py 26 Nov 2008 09:03:30 -0000 1.2.4.1
***************
*** 115,120 ****
f = open(pathname, "a+b")
f.close()
! except IOError, why:
! print "WARNING: File %s could not be opened - %s" % (pathname, why)
ver = options.version
--- 115,120 ----
f = open(pathname, "a+b")
f.close()
! except IOError as why:
! print("WARNING: File %s could not be opened - %s" % (pathname, why))
ver = options.version
***************
*** 123,127 ****
vmaj, vmin, vsub, vbuild = bits
except (IndexError, TypeError, ValueError):
! raise ValueError, "--version must be a.b.c.d (all integers) - got %r" % ver
ifn = options.internal_name
--- 123,127 ----
vmaj, vmin, vsub, vbuild = bits
except (IndexError, TypeError, ValueError):
! raise ValueError("--version must be a.b.c.d (all integers) - got %r" % ver)
ifn = options.internal_name
***************
*** 164,168 ****
if options.verbose:
! print "Stamped:", pathname
if __name__ == '__main__':
--- 164,168 ----
if options.verbose:
! print("Stamped:", pathname)
if __name__ == '__main__':
Index: win32serviceutil.py
===================================================================
RCS file: /cvsroot/pywin32/pywin32/win32/Lib/win32serviceutil.py,v
retrieving revision 1.26.2.1
retrieving revision 1.26.2.2
diff -C2 -d -r1.26.2.1 -r1.26.2.2
*** win32serviceutil.py 1 Oct 2008 04:15:45 -0000 1.26.2.1
--- win32serviceutil.py 26 Nov 2008 09:03:30 -0000 1.26.2.2
***************
*** 10,14 ****
import sys, string, pywintypes, os
! error = "Python Service Utility Error"
def LocatePythonServiceExe(exeName = None):
--- 10,14 ----
import sys, string, pywintypes, os
! error = RuntimeError
def LocatePythonServiceExe(exeName = None):
***************
*** 32,38 ****
if os.path.isfile(exeName):
return exeName
! raise RuntimeError, "The executable '%s' is registered as the Python " \
! "service exe, but it does not exist as specified" \
! % exeName
except win32api.error:
# OK - not there - lets go a-searchin'
--- 32,38 ----
if os.path.isfile(exeName):
return exeName
! raise RuntimeError("The executable '%s' is registered as the Python " \
! "service exe, but it does not exist as specified" \
! % exeName)
except win32api.error:
# OK - not there - lets go a-searchin'
***************
*** 46,50 ****
except win32api.error:
msg = "%s is not correctly registered\nPlease locate and run %s, and it will self-register\nThen run this service registration process again." % (exeName, exeName)
! raise error, msg
def _GetServiceShortName(longName):
--- 46,50 ----
except win32api.error:
msg = "%s is not correctly registered\nPlease locate and run %s, and it will self-register\nThen run this service registration process again." % (exeName, exeName)
! raise error(msg)
def _GetServiceShortName(longName):
***************
*** 75,79 ****
try:
return win32service.OpenService(hscm, name, access)
! except win32api.error, details:
if details[0] not in [winerror.ERROR_SERVICE_DOES_NOT_EXIST,
winerror.ERROR_INVALID_NAME]:
--- 75,79 ----
try:
return win32service.OpenService(hscm, name, access)
! except win32api.error as details:
if details[0] not in [winerror.ERROR_SERVICE_DOES_NOT_EXIST,
winerror.ERROR_INVALID_NAME]:
***************
*** 105,109 ****
pass
if not dllName:
! raise ValueError, "The name of the performance DLL must be available"
dllName = win32api.GetFullPathName(dllName)
# Now setup all the required "Performance" entries.
--- 105,109 ----
pass
if not dllName:
! raise ValueError("The name of the performance DLL must be available")
dllName = win32api.GetFullPathName(dllName)
# Now setup all the required "Performance" entries.
***************
*** 132,138 ****
finally:
os.chdir(oldPath)
! except win32api.error, details:
! print "The service was installed OK, but the performance monitor"
! print "data could not be loaded.", details
def _GetCommandLine(exeName, exeArgs):
--- 132,138 ----
finally:
os.chdir(oldPath)
! except win32api.error as details:
! print("The service was installed OK, but the performance monitor")
! print("data could not be loaded.", details)
def _GetCommandLine(exeName, exeArgs):
***************
*** 349,360 ****
win32api.Sleep(250)
else:
! raise pywintypes.error, (winerror.ERROR_SERVICE_REQUEST_TIMEOUT, "QueryServiceStatus", win32api.FormatMessage(winerror.ERROR_SERVICE_REQUEST_TIMEOUT)[:-2])
def __StopServiceWithTimeout(hs, waitSecs = 30):
try:
status = win32service.ControlService(hs, win32service.SERVICE_CONTROL_STOP)
! except pywintypes.error, (hr, name, msg):
if hr!=winerror.ERROR_SERVICE_NOT_ACTIVE:
! raise win32service.error, (hr, name, msg)
for i in range(waitSecs):
status = win32service.QueryServiceStatus(hs)
--- 349,361 ----
win32api.Sleep(250)
else:
! raise pywintypes.error(winerror.ERROR_SERVICE_REQUEST_TIMEOUT, "QueryServiceStatus", win32api.FormatMessage(winerror.ERROR_SERVICE_REQUEST_TIMEOUT)[:-2])
def __StopServiceWithTimeout(hs, waitSecs = 30):
try:
status = win32service.ControlService(hs, win32service.SERVICE_CONTROL_STOP)
! except pywintypes.error as xxx_todo_changeme:
! (hr, name, msg) = xxx_todo_changeme.args
if hr!=winerror.ERROR_SERVICE_NOT_ACTIVE:
! raise win32service.error(hr, name, msg)
for i in range(waitSecs):
status = win32service.QueryServiceStatus(hs)
***************
*** 363,367 ****
win32api.Sleep(1000)
else:
! raise pywintypes.error, (winerror.ERROR_SERVICE_REQUEST_TIMEOUT, "ControlService", win32api.FormatMessage(winerror.ERROR_SERVICE_REQUEST_TIMEOUT)[:-2])
--- 364,368 ----
win32api.Sleep(1000)
else:
! raise pywintypes.error(winerror.ERROR_SERVICE_REQUEST_TIMEOUT, "ControlService", win32api.FormatMessage(winerror.ERROR_SERVICE_REQUEST_TIMEOUT)[:-2])
***************
*** 407,414 ****
try:
StopService(serviceName, machine)
! except pywintypes.error, (hr, name, msg):
# Allow only "service not running" error
if hr!=winerror.ERROR_SERVICE_NOT_ACTIVE:
! raise win32service.error, (hr, name, msg)
# Give it a few goes, as the service may take time to stop
for i in range(waitSeconds):
--- 408,417 ----
try:
StopService(serviceName, machine)
! except pywintypes.error as xxx_todo_changeme1:
! # Allow only "service not running" error
! (hr, name, msg) = xxx_todo_changeme1.args
# Allow only "service not running" error
if hr!=winerror.ERROR_SERVICE_NOT_ACTIVE:
! raise win32service.error(hr, name, msg)
# Give it a few goes, as the service may take time to stop
for i in range(waitSeconds):
***************
*** 416,430 ****
StartService(serviceName, args, machine)
break
! except pywintypes.error, (hr, name, msg):
if hr!=winerror.ERROR_SERVICE_ALREADY_RUNNING:
raise
win32api.Sleep(1000)
else:
! print "Gave up waiting for the old service to stop!"
def _DebugCtrlHandler(evt):
if evt in (win32con.CTRL_C_EVENT, win32con.CTRL_BREAK_EVENT):
assert g_debugService
! print "Stopping debug service."
g_debugService.SvcStop()
return True
--- 419,434 ----
StartService(serviceName, args, machine)
break
! except pywintypes.error as xxx_todo_changeme2:
! (hr, name, msg) = xxx_todo_changeme2.args
if hr!=winerror.ERROR_SERVICE_ALREADY_RUNNING:
raise
win32api.Sleep(1000)
else:
! print("Gave up waiting for the old service to stop!")
def _DebugCtrlHandler(evt):
if evt in (win32con.CTRL_C_EVENT, win32con.CTRL_BREAK_EVENT):
assert g_debugService
! print("Stopping debug service.")
g_debugService.SvcStop()
return True
***************
*** 440,444 ****
global g_debugService
! print "Debugging service %s - press Ctrl+C to stop." % (cls._svc_name_,)
servicemanager.Debugging(True)
servicemanager.PrepareToHostSingle(cls)
--- 444,448 ----
global g_debugService
! print("Debugging service %s - press Ctrl+C to stop." % (cls._svc_name_,))
servicemanager.Debugging(True)
servicemanager.PrepareToHostSingle(cls)
***************
*** 467,471 ****
fname = os.path.join(path, win32api.FindFiles(fname)[0][8])
except win32api.error:
! raise error, "Could not resolve the path name '%s' to a full path" % (argv[0])
modName = os.path.splitext(fname)[0]
return modName + "." + cls.__name__
--- 471,475 ----
fname = os.path.join(path, win32api.FindFiles(fname)[0][8])
except win32api.error:
! raise error("Could not resolve the path name '%s' to a full path" % (argv[0]))
modName = os.path.splitext(fname)[0]
return modName + "." + cls.__name__
***************
*** 489,506 ****
except:
fname = sys.argv[0]
! print "Usage: '%s [options] install|update|remove|start [...]|stop|restart [...]|debug [...]'" % fname
! print "Options for 'install' and 'update' commands only:"
! print " --username domain\\username : The Username the service is to run under"
! print " --password password : The password for the username"
! print " --startup [manual|auto|disabled] : How the service starts, default = manual"
! print " --interactive : Allow the service to interact with the desktop."
! print " --perfmonini file: .ini file to use for registering performance monitor data"
! print " --perfmondll file: .dll file to use when querying the service for"
! print " performance data, default = perfmondata.dll"
! print "Options for 'start' and 'stop' commands only:"
! print " --wait seconds: Wait for the service to actually start or stop."
! print " If you specify --wait with the 'stop' option, the service"
! print " and all dependent services will be stopped, each waiting"
! print " the specified period."
sys.exit(1)
--- 493,510 ----
except:
fname = sys.argv[0]
! print("Usage: '%s [options] install|update|remove|start [...]|stop|restart [...]|debug [...]'" % fname)
! print("Options for 'install' and 'update' commands only:")
! print(" --username domain\\username : The Username the service is to run under")
! print(" --password password : The password for the username")
! print(" --startup [manual|auto|disabled] : How the service starts, default = manual")
! print(" --interactive : Allow the service to interact with the desktop.")
! print(" --perfmonini file: .ini file to use for registering performance monitor data")
! print(" --perfmondll file: .dll file to use when querying the service for")
! print(" performance data, default = perfmondata.dll")
! print("Options for 'start' and 'stop' commands only:")
! print(" --wait seconds: Wait for the service to actually start or stop.")
! print(" If you specify --wait with the 'stop' option, the service")
! print(" and all dependent services will be stopped, each waiting")
! print(" the specified period.")
sys.exit(1)
***************
*** 530,535 ****
try:
opts, args = getopt.getopt(argv[1:], customInstallOptions,["password=","username=","startup=","perfmonini=", "perfmondll=", "interactive", "wait="])
! except getopt.error, details:
! print details
usage()
userName = None
--- 534,539 ----
try:
opts, args = getopt.getopt(argv[1:], customInstallOptions,["password=","username=","startup=","perfmonini=", "perfmondll=", "interactive", "wait="])
! except getopt.error as details:
! print(details)
usage()
userName = None
***************
*** 555,564 ****
startup = map[string.lower(val)]
except KeyError:
! print "'%s' is not a valid startup option" % val
elif opt=='--wait':
try:
waitSecs = int(val)
except ValueError:
! print "--wait must specify an integer number of seconds."
usage()
--- 559,568 ----
startup = map[string.lower(val)]
except KeyError:
! print("'%s' is not a valid startup option" % val)
elif opt=='--wait':
try:
waitSecs = int(val)
except ValueError:
! print("--wait must specify an integer number of seconds.")
usage()
***************
*** 568,582 ****
if arg=="start":
knownArg = 1
! print "Starting service %s" % (serviceName)
try:
StartService(serviceName, args[1:])
if waitSecs:
WaitForServiceStatus(serviceName, win32service.SERVICE_RUNNING, waitSecs)
! except win32service.error, (hr, fn, msg):
! print "Error starting service: %s" % msg
elif arg=="restart":
knownArg = 1
! print "Restarting service %s" % (serviceName)
RestartService(serviceName, args[1:])
if waitSecs:
--- 572,587 ----
if arg=="start":
knownArg = 1
! print("Starting service %s" % (serviceName))
try:
StartService(serviceName, args[1:])
if waitSecs:
WaitForServiceStatus(serviceName, win32service.SERVICE_RUNNING, waitSecs)
! except win32service.error as xxx_todo_changeme3:
! (hr, fn, msg) = xxx_todo_changeme3.args
! print("Error starting service: %s" % msg)
elif arg=="restart":
knownArg = 1
! print("Restarting service %s" % (serviceName))
RestartService(serviceName, args[1:])
if waitSecs:
***************
*** 591,598 ****
try:
exeName = LocateSpecificServiceExe(serviceName)
! except win32api.error, exc:
if exc[0] == winerror.ERROR_FILE_NOT_FOUND:
! print "The service does not appear to be installed."
! print "Please install the service before debugging it."
sys.exit(1)
raise
--- 596,603 ----
try:
exeName = LocateSpecificServiceExe(serviceName)
! except win32api.error as exc:
if exc[0] == winerror.ERROR_FILE_NOT_FOUND:
! print("The service does not appear to be installed.")
! print("Please install the service before debugging it.")
sys.exit(1)
raise
***************
*** 629,633 ****
except AttributeError:
description = None
! print "Installing service %s" % (serviceName,)
# Note that we install the service before calling the custom option
# handler, so if the custom handler fails, we have an installed service (from NT's POV)
--- 634,638 ----
except AttributeError:
description = None
! print("Installing service %s" % (serviceName,))
# Note that we install the service before calling the custom option
# handler, so if the custom handler fails, we have an installed service (from NT's POV)
***************
*** 638,650 ****
if customOptionHandler:
apply( customOptionHandler, (opts,) )
! print "Service installed"
! except win32service.error, (hr, fn, msg):
if hr==winerror.ERROR_SERVICE_EXISTS:
arg = "update" # Fall through to the "update" param!
else:
! print "Error installing service: %s (%d)" % (msg, hr)
err = hr
! except ValueError, msg: # Can be raised by custom option handler.
! print "Error installing service: %s" % str(msg)
err = -1
# xxx - maybe I should remove after _any_ failed install - however,
--- 643,656 ----
if customOptionHandler:
apply( customOptionHandler, (opts,) )
! print("Service installed")
! except win32service.error as xxx_todo_changeme4:
! (hr, fn, msg) = xxx_todo_changeme4.args
if hr==winerror.ERROR_SERVICE_EXISTS:
arg = "update" # Fall through to the "update" param!
else:
! print("Error installing service: %s (%d)" % (msg, hr))
err = hr
! except ValueError as msg: # Can be raised by custom option handler.
! print("Error installing service: %s" % str(msg))
err = -1
# xxx - maybe I should remove after _any_ failed install - however,
***************
*** 656,660 ****
RemoveService(serviceName)
except win32api.error:
! print "Warning - could not remove the partially installed service."
if arg == "update":
--- 662,666 ----
RemoveService(serviceName)
except win32api.error:
! print("Warning - could not remove the partially installed service.")
if arg == "update":
***************
*** 676,701 ****
except AttributeError:
description=None
! print "Changing service configuration"
try:
ChangeServiceConfig(serviceClassString, serviceName, serviceDeps = serviceDeps, startType=startup, bRunInteractive=interactive, userName=userName,password=password, exeName=exeName, displayName = serviceDisplayName, perfMonIni=perfMonIni,perfMonDll=perfMonDll,exeArgs=exeArgs,description=description)
if customOptionHandler:
apply( customOptionHandler, (opts,) )
! print "Service updated"
! except win32service.error, (hr, fn, msg):
! print "Error changing service configuration: %s (%d)" % (msg,hr)
err = hr
elif arg=="remove":
knownArg = 1
! print "Removing service %s" % (serviceName)
try:
RemoveService(serviceName)
! print "Service removed"
! except win32service.error, (hr, fn, msg):
! print "Error removing service: %s (%d)" % (msg,hr)
err = hr
elif arg=="stop":
knownArg = 1
! print "Stopping service %s" % (serviceName)
try:
if waitSecs:
--- 682,709 ----
except AttributeError:
description=None
! print("Changing service configuration")
try:
ChangeServiceConfig(serviceClassString, serviceName, serviceDeps = serviceDeps, startType=startup, bRunInteractive=interactive, userName=userName,password=password, exeName=exeName, displayName = serviceDisplayName, perfMonIni=perfMonIni,perfMonDll=perfMonDll,exeArgs=exeArgs,description=description)
if customOptionHandler:
apply( customOptionHandler, (opts,) )
! print("Service updated")
! except win32service.error as xxx_todo_changeme5:
! (hr, fn, msg) = xxx_todo_changeme5.args
! print("Error changing service configuration: %s (%d)" % (msg,hr))
err = hr
elif arg=="remove":
knownArg = 1
! print("Removing service %s" % (serviceName))
try:
RemoveService(serviceName)
! print("Service removed")
! except win32service.error as xxx_todo_changeme6:
! (hr, fn, msg) = xxx_todo_changeme6.args
! print("Error removing service: %s (%d)" % (msg,hr))
err = hr
elif arg=="stop":
knownArg = 1
! print("Stopping service %s" % (serviceName))
try:
if waitSecs:
***************
*** 703,712 ****
else:
StopService(serviceName)
! except win32service.error, (hr, fn, msg):
! print "Error stopping service: %s (%d)" % (msg,hr)
err = hr
if not knownArg:
err = -1
! print "Unknown command - '%s'" % arg
usage()
return err
--- 711,721 ----
else:
StopService(serviceName)
! except win32service.error as xxx_todo_changeme7:
! (hr, fn, msg) = xxx_todo_changeme7.args
! print("Error stopping service: %s (%d)" % (msg,hr))
err = hr
if not knownArg:
err = -1
! print("Unknown command - '%s'" % arg)
usage()
return err
***************
*** 773,777 ****
def SvcOther(self, control):
try:
! print "Unknown control status - %d" % control
except IOError:
# services may not have a valid stdout!
--- 782,786 ----
def SvcOther(self, control):
try:
! print("Unknown control status - %d" % control)
except IOError:
# services may not have a valid stdout!
Index: win32evtlogutil.py
===================================================================
RCS file: /cvsroot/pywin32/pywin32/win32/Lib/win32evtlogutil.py,v
retrieving revision 1.10
retrieving revision 1.10.4.1
diff -C2 -d -r1.10 -r1.10.4.1
*** win32evtlogutil.py 25 Apr 2004 10:34:10 -0000 1.10
--- win32evtlogutil.py 26 Nov 2008 09:03:30 -0000 1.10.4.1
***************
*** 60,64 ****
win32api.RegDeleteKey(win32con.HKEY_LOCAL_MACHINE, \
"SYSTEM\\CurrentControlSet\\Services\\EventLog\\%s\\%s" % (eventLogType, appName))
! except win32api.error, (hr, fn, desc):
if hr != winerror.ERROR_FILE_NOT_FOUND:
raise
--- 60,65 ----
win32api.RegDeleteKey(win32con.HKEY_LOCAL_MACHINE, \
"SYSTEM\\CurrentControlSet\\Services\\EventLog\\%s\\%s" % (eventLogType, appName))
! except win32api.error as xxx_todo_changeme:
! (hr, fn, desc) = xxx_todo_changeme.args
if hr != winerror.ERROR_FILE_NOT_FOUND:
raise
Index: win32rcparser.py
===================================================================
RCS file: /cvsroot/pywin32/pywin32/win32/Lib/win32rcparser.py,v
retrieving revision 1.5
retrieving revision 1.5.2.1
diff -C2 -d -r1.5 -r1.5.2.1
*** win32rcparser.py 4 Jul 2008 01:55:13 -0000 1.5
--- win32rcparser.py 26 Nov 2008 09:03:30 -0000 1.5.2.1
***************
*** 132,136 ****
def debug(self, *args):
if self.debugEnabled:
! print args
def getToken(self):
--- 132,136 ----
def debug(self, *args):
if self.debugEnabled:
! print(args)
def getToken(self):
***************
*** 501,509 ****
lex = getattr(rcp, "lex", None)
if lex:
! print "ERROR parsing dialogs at line", lex.lineno
! print "Next 10 tokens are:"
for i in range(10):
! print lex.get_token(),
! print
raise
return rcp
--- 501,509 ----
lex = getattr(rcp, "lex", None)
if lex:
! print("ERROR parsing dialogs at line", lex.lineno)
! print("Next 10 tokens are:")
for i in range(10):
! print(lex.get_token(), end=' ')
! print()
raise
return rcp
***************
*** 570,577 ****
if __name__=='__main__':
if len(sys.argv) <= 1:
! print __doc__
! print
! print "See test_win32rcparser.py, and the win32rcparser directory (both"
! print "in the test suite) for an example of this module's usage."
else:
import pprint
--- 570,577 ----
if __name__=='__main__':
if len(sys.argv) <= 1:
! print(__doc__)
! print()
! print("See test_win32rcparser.py, and the win32rcparser directory (both")
! print("in the test suite) for an example of this module's usage.")
else:
import pprint
***************
*** 579,595 ****
if "-v" in sys.argv:
RCParser.debugEnabled = 1
! print "Dumping all resources in '%s'" % filename
resources = Parse(filename)
for id, ddef in resources.dialogs.items():
! print "Dialog %s (%d controls)" % (id, len(ddef))
pprint.pprint(ddef)
! print
for id, sdef in resources.stringTable.items():
! print "String %s=%r" % (id, sdef.value)
! print
for id, sdef in resources.bitmaps.items():
! print "Bitmap %s=%r" % (id, sdef)
! print
for id, sdef in resources.icons.items():
! print "Icon %s=%r" % (id, sdef)
! print
--- 579,595 ----
if "-v" in sys.argv:
RCParser.debugEnabled = 1
! print("Dumping all resources in '%s'" % filename)
resources = Parse(filename)
for id, ddef in resources.dialogs.items():
! print("Dialog %s (%d controls)" % (id, len(ddef)))
pprint.pprint(ddef)
! print()
for id, sdef in resources.stringTable.items():
! print("String %s=%r" % (id, sdef.value))
! print()
for id, sdef in resources.bitmaps.items():
! print("Bitmap %s=%r" % (id, sdef))
! print()
for id, sdef in resources.icons.items():
! print("Icon %s=%r" % (id, sdef))
! print()
Index: win32timezone.py
===================================================================
RCS file: /cvsroot/pywin32/pywin32/win32/Lib/win32timezone.py,v
retrieving revision 1.9.2.2
retrieving revision 1.9.2.3
diff -C2 -d -r1.9.2.2 -r1.9.2.3
*** win32timezone.py 11 Nov 2008 00:01:14 -0000 1.9.2.2
--- win32timezone.py 26 Nov 2008 09:03:30 -0000 1.9.2.3
***************
*** 234,238 ****
key = _winreg.OpenKeyEx(_winreg.HKEY_LOCAL_MACHINE, tzRegKeyPath)
except:
! raise ValueError, 'Timezone Name %s not found.' % timeZoneName
return key
--- 234,238 ----
key = _winreg.OpenKeyEx(_winreg.HKEY_LOCAL_MACHINE, tzRegKeyPath)
except:
! raise ValueError('Timezone Name %s not found.' % timeZoneName)
return key
***************
*** 515,519 ****
handle = DLLCache[matcher.groupdict()['dllname']]
result = win32api.LoadString(handle, int(matcher.groupdict()['index']))
! except win32api.error, e:
result = None
return result
--- 515,519 ----
handle = DLLCache[matcher.groupdict()['dllname']]
result = win32api.LoadString(handle, int(matcher.groupdict()['index']))
! except win32api.error as e:
result = None
return result
***************
*** 576,580 ****
key = self._find_first_match_(sortedKeys, item)
result = dict.__getitem__(self, key)
! if isinstance(result, RangeValueUndefined): raise KeyError, key
return result
--- 576,580 ----
key = self._find_first_match_(sortedKeys, item)
result = dict.__getitem__(self, key)
! if isinstance(result, RangeValueUndefined): raise KeyError(key)
return result
|