summaryrefslogtreecommitdiff
path: root/tox/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to 'tox/__init__.py')
-rw-r--r--tox/__init__.py32
1 files changed, 19 insertions, 13 deletions
diff --git a/tox/__init__.py b/tox/__init__.py
index 2cb1461..ccdae2d 100644
--- a/tox/__init__.py
+++ b/tox/__init__.py
@@ -1,17 +1,23 @@
#
__version__ = '1.0.dev1'
-from py.apipkg import initpkg
+class exception:
+ class Error(Exception):
+ def __str__(self):
+ return "%s: %s" %(self.__class__.__name__, self.args[0])
+ class ConfigError(Error):
+ """ error in tox configuration. """
+ class UnsupportedInterpreter(Error):
+ "signals an unsupported Interpreter"
+ class InterpreterNotFound(Error):
+ "signals that an interpreter could not be found"
+ class InvocationError(Error):
+ """ an error while invoking a script. """
+ class MissingFile(Error):
+ """ an error while invoking a script. """
+ class MissingDirectory(Error):
+ """ a directory did not exist. """
+ class MissingDependency(Error):
+ """ a dependency could not be found or determined. """
-initpkg(__name__, dict(
- cmdline = '._cmdline:main',
- exception = dict(
- ConfigError = '._config:ConfigError',
- InvocationError = '._exception:InvocationError',
- MissingDependency= '._exception:MissingDependency',
- UnsupportedInterpreter = '._exception:UnsupportedInterpreter',
- InterpreterNotFound = '._exception:InterpreterNotFound',
- MissingFile = '._exception:MissingFile',
- MissingDirectory = '._exception:MissingDirectory',
- )
-))
+from tox._cmdline import main as cmdline