[Python-Dev] datetime.date.today() raises "AttributeError: time"

Ralf Schmitt schmir at gmail.com
Wed Dec 10 19:19:19 CET 2008


On Wed, Dec 10, 2008 at 6:49 PM, James Y Knight <foom at fuhm.net> wrote:
>
> On Dec 10, 2008, at 5:55 AM, Lennart Regebro wrote:
>
>> Turns out, I created an empty time.py in /tmp, just to see the error
>> message. By buildout will when creating eggs from checked out modules,
>> copy them to a directory under /tmp, and evidently run python from
>> /tmp to create the eggs. So that process finds the time.pyc, created
>> from the empty time.py, which I hadn't deleted, and breaks!
>
> Sounds like a security hole in zc.buildout. Imagine someone *else* made a
> time.py in /tmp...
>

the current working directory is also added to sys.path if PYTHONPATH
contains an empty element. might be the case here...

- Ralf


More information about the Python-Dev mailing list