[Python-checkins] distutils2: Move installation exceptions from distutils2.install to distutils2.errors and

tarek.ziade python-checkins at python.org
Wed Feb 16 22:23:56 CET 2011


tarek.ziade pushed 5dd221e9bb49 to distutils2:

http://hg.python.org/distutils2/rev/5dd221e9bb49
changeset:   1023:5dd221e9bb49
user:        Kelsey Hightower <kelsey.hightower at gmail.com>
date:        Sun Feb 13 12:07:46 2011 -0500
summary:
  Move installation exceptions from distutils2.install to distutils2.errors and pep8 clean up on both modules

files:
  distutils2/errors.py
  distutils2/install.py

diff --git a/distutils2/errors.py b/distutils2/errors.py
--- a/distutils2/errors.py
+++ b/distutils2/errors.py
@@ -9,7 +9,6 @@
 symbols whose names start with "Distutils" and end with "Error"."""
 
 
-
 class DistutilsError(Exception):
     """The root of all Distutils evil."""
 
@@ -135,3 +134,11 @@
     This guard can be disabled by setting that option False.
     """
     pass
+
+
+class InstallationException(Exception):
+    """Base exception for installation scripts"""
+
+
+class InstallationConflict(InstallationException):
+    """Raised when a conflict is detected"""
diff --git a/distutils2/install.py b/distutils2/install.py
--- a/distutils2/install.py
+++ b/distutils2/install.py
@@ -22,7 +22,8 @@
 from distutils2.depgraph import generate_graph
 from distutils2.index import wrapper
 from distutils2.index.errors import ProjectNotFound, ReleaseNotFound
-from distutils2.errors import DistutilsError
+from distutils2.errors import (DistutilsError, InstallationException,
+                               InstallationConflict)
 from distutils2.version import get_version_predicate
 
 
@@ -30,14 +31,6 @@
            'install']
 
 
-class InstallationException(Exception):
-    """Base exception for installation scripts"""
-
-
-class InstallationConflict(InstallationException):
-    """Raised when a conflict is detected"""
-
-
 def _move_files(files, destination):
     """Move the list of files in the destination folder, keeping the same
     structure.
@@ -364,7 +357,7 @@
     file_count = 0
     for file_ in rmfiles:
         os.remove(file_)
-        file_count +=1
+        file_count += 1
 
     dir_count = 0
     for dirname in rmdirs:

--
Repository URL: http://hg.python.org/distutils2


More information about the Python-checkins mailing list