{"action":"closed","issue":{"url":"https://api.github.com/repos/kivy/buildozer/issues/174","labels_url":"https://api.github.com/repos/kivy/buildozer/issues/174/labels{/name}","comments_url":"https://api.github.com/repos/kivy/buildozer/issues/174/comments","events_url":"https://api.github.com/repos/kivy/buildozer/issues/174/events","html_url":"https://github.com/kivy/buildozer/issues/174","id":56150712,"number":174,"title":"sudo buildozer Fails","user":{"login":"FeralBytes","id":7874274,"avatar_url":"https://avatars.githubusercontent.com/u/7874274?v=3","gravatar_id":"","url":"https://api.github.com/users/FeralBytes","html_url":"https://github.com/FeralBytes","followers_url":"https://api.github.com/users/FeralBytes/followers","following_url":"https://api.github.com/users/FeralBytes/following{/other_user}","gists_url":"https://api.github.com/users/FeralBytes/gists{/gist_id}","starred_url":"https://api.github.com/users/FeralBytes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FeralBytes/subscriptions","organizations_url":"https://api.github.com/users/FeralBytes/orgs","repos_url":"https://api.github.com/users/FeralBytes/repos","events_url":"https://api.github.com/users/FeralBytes/events{/privacy}","received_events_url":"https://api.github.com/users/FeralBytes/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-02-01T03:49:12Z","updated_at":"2015-03-08T09:59:27Z","closed_at":"2015-03-08T09:59:27Z","body":"Yes I know you are not susposed to run Buildozer as root. But it still should not crash with a traceback.\r\n```\r\nTraceback (most recent call last):\r\n  File \"/usr/local/bin/buildozer\", line 9, in <module>\r\n    load_entry_point('buildozer==0.26', 'console_scripts', 'buildozer')()\r\n  File \"/usr/local/lib/python3.4/dist-packages/buildozer/scripts/client.py\", line 13, in main\r\n    Buildozer().run_command(sys.argv[1:])\r\n  File \"/usr/local/lib/python3.4/dist-packages/buildozer/__init__.py\", line 946, in run_command\r\n    self.check_root()\r\n  File \"/usr/local/lib/python3.4/dist-packages/buildozer/__init__.py\", line 985, in check_root\r\n    cont = input('Are you sure you want to continue [y/n]? ')\r\nUnboundLocalError: local variable 'input' referenced before assignment\r\n```\r\nThe lines that actually cause this error are 973-976:\r\n```python\r\n        try:  # ensure same result in python2 and python3\r\n            input = raw_input\r\n        except NameError:\r\n            pass\r\n```\r\nI recommend lines 973-976 become:\r\n```python\r\n        try:  # ensure same result in python2 and python3\r\n            input_func = raw_input\r\n        except NameError:\r\n            input_func = input\r\n```\r\nAnd line 985 becomes:\r\n```python\r\ncont = input_func('Are you sure you want to continue [y/n]? ')\r\n```\r\n\r\n<bountysource-plugin>\r\n---\r\nWant to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/8192415-sudo-buildozer-fails?utm_campaign=plugin&utm_content=tracker%2F77123&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F77123&utm_medium=issues&utm_source=github).\r\n</bountysource-plugin>"}}