fab-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Fab-user] Re: [ISSUE] AttributeError: 'str' object has no attribute 'is


From: Vincent Fretin
Subject: [Fab-user] Re: [ISSUE] AttributeError: 'str' object has no attribute 'isint'
Date: Fri, 8 May 2009 14:54:44 +0200

On Fri, May 8, 2009 at 2:33 PM, Vincent Fretin <address@hidden> wrote:
> Hi,
>
> I've just tested fabric-0.9a2.tar.gz. Nice work have been done since
> 0.1. The api looks better.
>
> I get an error when I use
> sudo("pwd", user="zope")
>
> Traceback (most recent call last):
>  File "build/bdist.linux-x86_64/egg/fabric/main.py", line 402, in main
>  File "/home/vincentfretin/workspace/MyProject/fabfile.py", line 23, in deploy
>    sudo("pwd", user="zope")
>  File "build/bdist.linux-x86_64/egg/fabric/network.py", line 302, in
> host_prompting_wrapper
>  File "build/bdist.linux-x86_64/egg/fabric/operations.py", line 414, in sudo
> AttributeError: 'str' object has no attribute 'isint'
>
> Regards
> --
> Vincent Fretin
>

The problem is at line 414 in fabric/operations.py
 if str(user).isint():
            user = "#%s" % user

I use Python 2.5. isint is maybe a Python 2.6 function?
I think we could achieve the same result with
try:
     user = "#%d" % int(str(user))
except ValueError:
    pass

-- 
Vincent Fretin




reply via email to

[Prev in Thread] Current Thread [Next in Thread]