Create an error module containing the top-level error class.
authorDavid Anderson <david.jc.anderson@gmail.com>
Fri, 13 Mar 2009 01:44:18 +0000
changeset 1822 c6bb25fa7f7b
parent 1821 6a548cbb0f7e
child 1823 f55d0e1d3f82
Create an error module containing the top-level error class.
scripts/release/error.py
scripts/release/release.py
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/scripts/release/error.py	Fri Mar 13 01:44:18 2009 +0000
@@ -0,0 +1,22 @@
+# Copyright 2009 the Melange authors.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+__authors__ = [
+    # alphabetical order by last name, please
+    '"David Anderson" <dave@natulte.net>',
+    ]
+
+
+class Error(Exception):
+    """Base class for release script exceptions."""
--- a/scripts/release/release.py	Fri Mar 13 00:12:42 2009 +0000
+++ b/scripts/release/release.py	Fri Mar 13 01:44:18 2009 +0000
@@ -47,6 +47,8 @@
 import subprocess
 import sys
 
+import error
+
 
 # Default repository URLs for Melange and the Google release
 # repository.
@@ -59,7 +61,7 @@
 MELANGE_RELEASE_RE = re.compile(r'\d-\d-\d{8}')
 
 
-class Error(Exception):
+class Error(error.Error):
     pass