diff mercurial/util.py @ 7646:e62a456b8dc5

error: move SignatureError
author Matt Mackall <mpm@selenic.com>
date Mon, 12 Jan 2009 13:51:43 -0600
parents 182b7114d35a
children deec6628e62b
line wrap: on
line diff
--- a/mercurial/util.py	Mon Jan 12 13:35:35 2009 -0600
+++ b/mercurial/util.py	Mon Jan 12 13:51:43 2009 -0600
@@ -13,7 +13,7 @@
 """
 
 from i18n import _
-import cStringIO, errno, getpass, re, shutil, sys, tempfile, traceback
+import cStringIO, errno, getpass, re, shutil, sys, tempfile, traceback, error
 import os, stat, threading, time, calendar, ConfigParser, locale, glob, osutil
 import imp
 
@@ -707,9 +707,6 @@
         if cwd is not None and oldcwd != cwd:
             os.chdir(oldcwd)
 
-class SignatureError(Exception):
-    pass
-
 def checksignature(func):
     '''wrap a function with code to check for calling errors'''
     def check(*args, **kwargs):
@@ -717,7 +714,7 @@
             return func(*args, **kwargs)
         except TypeError:
             if len(traceback.extract_tb(sys.exc_info()[2])) == 1:
-                raise SignatureError
+                raise error.SignatureError
             raise
 
     return check