From 817186b16eaa216091d6d8adc92548e355c4cfcd Mon Sep 17 00:00:00 2001 From: Anthony Tuininga Date: Thu, 2 Oct 2008 17:28:23 +0000 Subject: [PATCH] Raise errors as instances of setup errors, not strings in order to provide initial support for Python 3.0. --- setup.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/setup.py b/setup.py index 35157ac..e243e1f 100644 --- a/setup.py +++ b/setup.py @@ -114,14 +114,14 @@ if userOracleHome is not None: if not CheckOracleHome(userOracleHome): messageFormat = "Oracle home (%s) does not refer to an " \ "9i, 10g or 11g installation." - raise DistutilsSetupError, messageFormat % userOracleHome + raise DistutilsSetupError(messageFormat % userOracleHome) else: for path in os.environ["PATH"].split(os.pathsep): if CheckOracleHome(path): break if oracleHome is None: - raise DistutilsSetupError, "cannot locate an Oracle software " \ - "installation" + raise DistutilsSetupError("cannot locate an Oracle software " \ + "installation") # define some variables if sys.platform == "win32": @@ -133,7 +133,7 @@ if sys.platform == "win32": if os.path.isdir(path): includeDirs.append(path) if not includeDirs: - raise DistutilsSetupError, "cannot locate Oracle include files" + raise DistutilsSetupError("cannot locate Oracle include files") libs = ["oci"] elif sys.platform == "cygwin": includeDirs = ["/usr/include", "rdbms/demo", "rdbms/public", \ @@ -159,7 +159,7 @@ else: if os.path.isdir(path): includeDirs.append(path) if not includeDirs: - raise DistutilsSetupError, "cannot locate Oracle include files" + raise DistutilsSetupError("cannot locate Oracle include files") libPath = os.path.join(oracleHome, "lib") if sys.maxint == 2 ** 31 - 1: alternatePath = os.path.join(oracleHome, "lib32")