[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fab-user] Re: a problem about fabric
From: |
Christian Vest Hansen |
Subject: |
[Fab-user] Re: a problem about fabric |
Date: |
Tue, 1 Jul 2008 12:57:03 +0200 |
What an annoying misfeature. It's fixed in the nongnu.org repository.
On 7/1/08, hu zg <address@hidden> wrote:
> Python 2.5.2 (r252:60911, Feb 23 2008, 21:20:32)
> [GCC 4.2.3] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import os
> >>> os.getlogin()
>
> Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
>
> OSError: [Errno 2] No such file or directory
> >>>
> >>> import pwd
>
> >>> pwd.getpwuid(os.getuid())[0]
>
> 'hzg'
> >>>
>
>
> 2008/7/1 hu zg <address@hidden>:
>
> > python version is 2.5.2 on my archlinux machine.
> >
> > if it run on console terminal, os.getlogin() is no error.
> > but it run on gnome terminal in Xwindow, os.getlogin() raise an exception
> >
> > you can try it in Xwindow on other linux platform
> >
> > 2008/7/1 Christian Vest Hansen <address@hidden>:
> >> You wrote "os.login" in your shell instead of "os.getlogin", and that
> >> is what causes that traceback.
> >>
> >> If Fabric is consistently complaining about "os.getlogin", then I'de
> >> like to see the traceback from invoking Fabric, and know what version
> >> of Python you are using.
> >>
> >>
> >> On 7/1/08, hu zg <address@hidden> wrote:
> >>> hi, karmazilla
> >>>
> >>> thanks for your work on fabric.
> >>>
> >>> last month i edited a fabfile to deploy, then fabric is 0.0.5 version.
> >>> and before installed it, I modified a problem.
> >>>
> >>> because i works on gnome of archlinux platform, i found a problem.
> >>>
> >>> In the gnome terminal, i enter python shell,
> >>>
> >>> import os
> >>> os.getlogin()
> >>>
> >>> >>> import os
> >>> >>> os.login()
> >>> Traceback (most recent call last):
> >>> File "<stdin>", line 1, in <module>
> >>> AttributeError: 'module' object has no attribute 'login'
> >>> >>>
> >>>
> >>> but it works on console shell. so I fixed it into fabric.py:
> >>>
> >>> 'fab_user': os.getlogin()
> >>>
> >>> ====>
> >>> import pwd
> >>> 'fab_user': pwd.getpwuid(os.getuid())[0]
> >>>
> >>> so it works well in gnome terminal.
> >>>
> >>> but today i download the new edition 0.0.7 fabric, the problem exists
> >>> yet, so i write you the email.
> >>>
> >>
> >>
> >> --
> >> Venlig hilsen / Kind regards,
> >> Christian Vest Hansen.
> >>
> >
>
--
Venlig hilsen / Kind regards,
Christian Vest Hansen.