Skip to content

wrong code in <virtualenv>/bin/attic script #253

@ThomasWaldmann

Description

@ThomasWaldmann

Python-3.2 and virtualenv on raspbian (debian wheezy, python 3.2.3):

(env)pi@raspberrypi ~/attic/merge $ attic init ../repo
Traceback (most recent call last):
  File "/home/pi/attic/env/bin/attic", line 7, in <module>
    execfile(__file__)
NameError: name 'execfile' is not defined

Such a script on another machine with ubuntu looks like:

...
if sys.version_info < (3, 0):
    execfile(__file__)
else:
    exec(compile(open(__file__).read(), __file__, 'exec'))

So somehow it tries to use the pre-py3 way.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions