[Zope-CMF] Re: SVN: CMF/branches/1.5/CMFSetup/workflow.py string.rsplit is Python 2.4 only.

Tres Seaver tseaver at palladion.com
Tue Sep 5 12:29:57 EDT 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Stefan H. Holek wrote:
> Log message for revision 69967:
>   string.rsplit is Python 2.4 only.
>   
> 
> Changed:
>   U   CMF/branches/1.5/CMFSetup/workflow.py
> 
> -=-
> Modified: CMF/branches/1.5/CMFSetup/workflow.py
> ===================================================================
> --- CMF/branches/1.5/CMFSetup/workflow.py	2006-09-05 00:12:34 UTC (rev 69966)
> +++ CMF/branches/1.5/CMFSetup/workflow.py	2006-09-05 09:08:17 UTC (rev 69967)
> @@ -200,7 +200,8 @@
>                  filename = script_info['filename']
>                  if filename:
>                      if '/' in filename:
> -                        subdir, filename = filename.rsplit('/', 1)
> +                        last = filename.rindex('/')
> +                        subdir, filename = filename[:last], filename[last+1:]
>                      else:
>                          subdir = ''
>                      context.writeDataFile(filename,

Good catch!  sorry about missing that (I don't know why my tests were
passing, in that case).


Tres.
- --
===================================================================
Tres Seaver          +1 202-558-7113          tseaver at palladion.com
Palladion Software   "Excellence by Design"    http://palladion.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFE/aYF+gerLs4ltQ4RAk+yAKDJsMKJslWhmRZKB6X17UUir7r0BwCggwjm
sS6SaC1CXioXphg7t35cfEQ=
=TH6S
-----END PGP SIGNATURE-----


More information about the Zope-CMF mailing list