Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sudo buildozer Fails #174

Closed
FeralBytes opened this issue Feb 1, 2015 · 1 comment
Closed

sudo buildozer Fails #174

FeralBytes opened this issue Feb 1, 2015 · 1 comment

Comments

@FeralBytes
Copy link
Contributor

Yes I know you are not susposed to run Buildozer as root. But it still should not crash with a traceback.

Traceback (most recent call last):
  File "/usr/local/bin/buildozer", line 9, in <module>
    load_entry_point('buildozer==0.26', 'console_scripts', 'buildozer')()
  File "/usr/local/lib/python3.4/dist-packages/buildozer/scripts/client.py", line 13, in main
    Buildozer().run_command(sys.argv[1:])
  File "/usr/local/lib/python3.4/dist-packages/buildozer/__init__.py", line 946, in run_command
    self.check_root()
  File "/usr/local/lib/python3.4/dist-packages/buildozer/__init__.py", line 985, in check_root
    cont = input('Are you sure you want to continue [y/n]? ')
UnboundLocalError: local variable 'input' referenced before assignment

The lines that actually cause this error are 973-976:

        try:  # ensure same result in python2 and python3
            input = raw_input
        except NameError:
            pass

I recommend lines 973-976 become:

        try:  # ensure same result in python2 and python3
            input_func = raw_input
        except NameError:
            input_func = input

And line 985 becomes:

cont = input_func('Are you sure you want to continue [y/n]? ')
@tito
Copy link
Member

tito commented Mar 8, 2015

It's weird, both works on my installation with python 2 or 3...

@tito tito closed this as completed in 0c9d9ab Mar 8, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants