[Twisted-Python] Re: [Twisted-commits] r14281 - Cope with integer owner/group info.

Jp Calderone exarkun at divmod.com
Sun Aug 21 09:06:25 EDT 2005


On Sun, 21 Aug 2005 00:16:32 -0600, Andrew Bennetts <spiv at wolfwood.twistedmatrix.com> wrote:
>Author: spiv
>Date: Sun Aug 21 00:16:32 2005
>New Revision: 14281
>
>Modified:
>   trunk/twisted/protocols/ftp.py
>Log:
>Cope with integer owner/group info.
>
>Modified: trunk/twisted/protocols/ftp.py
>==============================================================================
>--- trunk/twisted/protocols/ftp.py	(original)
>+++ trunk/twisted/protocols/ftp.py	Sun Aug 21 00:16:32 2005
>@@ -370,8 +370,8 @@
>             'directory': directory and 'd' or '-',
>             'permissions': formatMode(permissions),
>             'hardlinks': hardlinks,
>-            'owner': owner[:8],
>-            'group': group[:8],
>+            'owner': str(owner)[:8],
>+            'group': str(group)[:8],
>             'size': size,
>             'date': formatDate(time.gmtime(modified)),
>             'name': name}

The interface doc string explicitly states 'owner' and 'group' here will already be strings.  I don't see any reason to widen the interface, but if you do, please update the documentation.

Jp




More information about the Twisted-Python mailing list