You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Edmund Wong <ed...@belfordhk.com> on 2009/03/31 04:22:04 UTC

[PATCH] change-svn-wc-format (minor change)

Hi guys,

Minor change to line #93.  According to Python rules,
the following is 'wrong' (for v2.6):

   except UnrecognizedWCFormatException, e:

It should be:

   except (UnrecognizedWCFormatException, e):

Please note that this was 'accidentally' pointed out by
ibarrien@adobe.com.  I looked at the v2.6 rules and
'lo and behold, it's wrong to have the first line.
(Of course, the interpreter didn't complain when
I ran it, but rules are rules.) Mind you, he was referring
to Python 3.01, in which case the statement should
be:

   except (UnrecognziedWCFormatException as e):

But since 3.0x isn't supported in subversion (yet),
I'll leave this until later or never since by 1.7,
this script will be useless, at least for 1.7 users. :)

[[[
     Changed an exception statement to reflect
   2.6 rules.

   * tools/client-side/change-svn-wc-format.py:
       (write_dir_format): Added parenthesis to
                           the exception line
                           as per Python 2.6 rules.

   Found by: Ignacio Barrientos <ib...@adobe.com>

   Patch by: Edmund Wong <ed...@belfordhk.com>

]]]

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=1491128

Re: [PATCH] change-svn-wc-format (minor change)

Posted by Arfrever Frehtes Taifersar Arahesis <Ar...@GMail.Com>.
2009-03-31 06:22 Edmund Wong <ed...@belfordhk.com> napisał(a):
> Minor change to line #93.  According to Python rules,
> the following is 'wrong' (for v2.6):
>
>   except UnrecognizedWCFormatException, e:
>
> It should be:
>
>   except (UnrecognizedWCFormatException, e):

No. The code was correct. It catches UnrecognizedWCFormatException and
assigns it to variable 'e'.

> Please note that this was 'accidentally' pointed out by
> ibarrien@adobe.com.  I looked at the v2.6 rules and
> 'lo and behold, it's wrong to have the first line.
> (Of course, the interpreter didn't complain when
> I ran it, but rules are rules.) Mind you, he was referring
> to Python 3.01, in which case the statement should
> be:
>
>   except (UnrecognziedWCFormatException as e):

In Python 3 this line would have to be:

except UnrecognizedWCFormatException as e:

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=1494800