[pywin32-checkins] pywin32/win32/scripts regsetup.py,1.15,1.16
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: Mark H. <mha...@us...> - 2008-11-26 08:56:40
|
Update of /cvsroot/pywin32/pywin32/win32/scripts In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv19784/scripts Modified Files: regsetup.py Log Message: modernize syntax: all remaining raise statements in win32/* upgraded Index: regsetup.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/scripts/regsetup.py,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** regsetup.py 30 May 2008 23:14:17 -0000 1.15 --- regsetup.py 26 Nov 2008 08:56:33 -0000 1.16 *************** *** 54,58 **** ret = os.path.abspath(pathLook) return ret, ret ! raise error, "The package %s can not be located" % packageName def FindHelpPath(helpFile, helpDesc, searchPaths): --- 54,58 ---- ret = os.path.abspath(pathLook) return ret, ret ! raise error("The package %s can not be located" % packageName) def FindHelpPath(helpFile, helpDesc, searchPaths): *************** *** 78,82 **** if FileExists(os.path.join( pathLook, helpFile)): return os.path.abspath(pathLook) ! raise error, "The help file %s can not be located" % helpFile def FindAppPath(appName, knownFileName, searchPaths): --- 78,82 ---- if FileExists(os.path.join( pathLook, helpFile)): return os.path.abspath(pathLook) ! raise error("The help file %s can not be located" % helpFile) def FindAppPath(appName, knownFileName, searchPaths): *************** *** 98,102 **** # Found it return os.path.abspath(pathLook) ! raise error, "The file %s can not be located for application %s" % (knownFileName, appName) def FindPythonExe(exeAlias, possibleRealNames, searchPaths): --- 98,102 ---- # Found it return os.path.abspath(pathLook) ! raise error("The file %s can not be located for application %s" % (knownFileName, appName)) def FindPythonExe(exeAlias, possibleRealNames, searchPaths): *************** *** 161,165 **** import win32ui, win32con except ImportError: ! raise error, "Need to locate the file %s, but the win32ui module is not available\nPlease run the program again, passing as a parameter the path to this file." % fileName # Display a common dialog to locate the file. flags=win32con.OFN_FILEMUSTEXIST --- 161,165 ---- import win32ui, win32con except ImportError: ! raise error("Need to locate the file %s, but the win32ui module is not available\nPlease run the program again, passing as a parameter the path to this file." % fileName) # Display a common dialog to locate the file. flags=win32con.OFN_FILEMUSTEXIST *************** *** 169,173 **** dlg.SetOFNTitle("Locate " + fileName) if dlg.DoModal() <> win32con.IDOK: ! raise KeyboardInterrupt, "User cancelled the process" retPath = dlg.GetPathName() return os.path.abspath(retPath) --- 169,173 ---- dlg.SetOFNTitle("Locate " + fileName) if dlg.DoModal() <> win32con.IDOK: ! raise KeyboardInterrupt("User cancelled the process") retPath = dlg.GetPathName() return os.path.abspath(retPath) *************** *** 215,219 **** libPath = LocatePath("os.py", searchPaths) if libPath is None: ! raise error, "The core Python library could not be located." corePath = None --- 215,219 ---- libPath = LocatePath("os.py", searchPaths) if libPath is None: ! raise error("The core Python library could not be located.") corePath = None *************** *** 226,230 **** corePath = LocatePath("unicodedata%s.pyd" % suffix, searchPaths) if corePath is None: ! raise error, "The core Python path could not be located." installPath = os.path.abspath(os.path.join(libPath, "..")) --- 226,230 ---- corePath = LocatePath("unicodedata%s.pyd" % suffix, searchPaths) if corePath is None: ! raise error("The core Python path could not be located.") installPath = os.path.abspath(os.path.join(libPath, "..")) *************** *** 242,246 **** """ import regutil, string ! if not packageName: raise error, "A package name must be supplied" corePaths = string.split(regutil.GetRegisteredNamedPath(None),";") if not searchPaths: searchPaths = corePaths --- 242,246 ---- """ import regutil, string ! if not packageName: raise error("A package name must be supplied") corePaths = string.split(regutil.GetRegisteredNamedPath(None),";") if not searchPaths: searchPaths = corePaths *************** *** 498,502 **** if o=='-c': if not len(searchPaths): ! raise error, "-c option must provide at least one additional path" import win32api, regutil currentPaths = string.split(regutil.GetRegisteredNamedPath(None),";") --- 498,502 ---- if o=='-c': if not len(searchPaths): ! raise error("-c option must provide at least one additional path") import win32api, regutil currentPaths = string.split(regutil.GetRegisteredNamedPath(None),";") |