[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn commit: rev 3434 - trunk/tools/hook-scripts

From: Gustavo Niemeyer <niemeyer_at_conectiva.com>
Date: 2002-10-22 20:18:02 CEST

> > By all means, let's leave them in. But protect the script so it bombs
> > in a friendly way if the Python interpreter is too old.
>
> I'll do that. Thank you!

Oops.. there's a minor problem here. "from __future__" statements must
be the very first thing in a python file. I'll just get rid of the
generator. Here's the patch I'm applying:

Index: svnperms.py
===================================================================
--- svnperms.py
+++ svnperms.py 2002-10-22 15:12:39.000000000 -0300
@@ -1,5 +1,4 @@
 #!/usr/bin/python
-### from __future__ import generators
 import commands
 import sys, os
 import getopt
@@ -67,13 +66,15 @@
         return self._sections_dict.get(option.lower(), default)
 
     def walk(self, section, option=None):
+ ret = []
         if option:
             option = option.lower()
         for sectname, options in self._sections_list:
             if sectname == section:
                 for optname, value in options:
                     if not option or optname == option:
- yield (optname, value)
+ ret.append((optname, value))
+ return ret
 
 
 class Permission:

-- 
Gustavo Niemeyer
[ 2AAC 7928 0FBF 0299 5EB5  60E2 2253 B29A 6664 3A0C ]
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Oct 22 20:18:49 2002

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.