Patchwork error: restore python 2.4 compatibility for BundleValueError

login
register
mail settings
Submitter Brendan Cully
Date June 11, 2014, 12:13 a.m.
Message ID <b938ceeaa41dfeeb1ab7.1402445582@casa>
Download mbox | patch
Permalink /patch/4970/
State Accepted
Commit fecead61d222ae0bd4b866034272e3e8f0ca00b3
Headers show

Comments

Brendan Cully - June 11, 2014, 12:13 a.m.
# HG changeset patch
# User Brendan Cully <brendan@kublai.com>
# Date 1402444831 25200
#      Tue Jun 10 17:00:31 2014 -0700
# Node ID b938ceeaa41dfeeb1ab7ddbebf0426aae5a1ed49
# Parent  7afe70a5d2ad5b22c21ba9be849451407c1f337f
error: restore python 2.4 compatibility for BundleValueError

Under python 2.4, this:
    super(BundleValueError, self).__init__(msg)
raises this:
    TypeError: super() argument 1 must be type, not classobj
Matt Mackall - June 11, 2014, 5:54 p.m.
On Tue, 2014-06-10 at 17:13 -0700, Brendan Cully wrote:
> # HG changeset patch
> # User Brendan Cully <brendan@kublai.com>
> # Date 1402444831 25200
> #      Tue Jun 10 17:00:31 2014 -0700
> # Node ID b938ceeaa41dfeeb1ab7ddbebf0426aae5a1ed49
> # Parent  7afe70a5d2ad5b22c21ba9be849451407c1f337f
> error: restore python 2.4 compatibility for BundleValueError

Queued for default, thanks.

Patch

diff -r 7afe70a5d2ad -r b938ceeaa41d mercurial/error.py
--- a/mercurial/error.py	Tue May 27 14:45:31 2014 -0700
+++ b/mercurial/error.py	Tue Jun 10 17:00:31 2014 -0700
@@ -111,7 +111,7 @@ 
             msg = parttype
         if self.params:
             msg = '%s - %s' % (msg, ', '.join(self.params))
-        super(BundleValueError, self).__init__(msg)
+        ValueError.__init__(self, msg)
 
 class ReadOnlyPartError(RuntimeError):
     """error raised when code tries to alter a part being generated"""