# HG changeset patch # User Matt Mackall # Date 1231789903 21600 # Node ID e62a456b8dc578655b53ca4978e22b662193984e # Parent 020a896a5292b647a920026135c608e08864ca54 error: move SignatureError diff -r 020a896a5292 -r e62a456b8dc5 mercurial/dispatch.py --- a/mercurial/dispatch.py Mon Jan 12 13:35:35 2009 -0600 +++ b/mercurial/dispatch.py Mon Jan 12 13:51:43 2009 -0600 @@ -371,7 +371,7 @@ def checkargs(): try: return cmdfunc() - except util.SignatureError: + except error.SignatureError: raise error.ParseError(cmd, _("invalid arguments")) if options['profile']: diff -r 020a896a5292 -r e62a456b8dc5 mercurial/error.py --- a/mercurial/error.py Mon Jan 12 13:35:35 2009 -0600 +++ b/mercurial/error.py Mon Jan 12 13:51:43 2009 -0600 @@ -59,3 +59,6 @@ # derived from KeyboardInterrupt to simplify some breakout code class SignalInterrupt(KeyboardInterrupt): """Exception raised on SIGTERM and SIGHUP.""" + +class SignatureError(Exception): + pass diff -r 020a896a5292 -r e62a456b8dc5 mercurial/util.py --- 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