~command-not-found-developers/command-not-found/0.2

« back to all changes in this revision

Viewing changes to CommandNotFound/CommandNotFound.py

  • Committer: Zygmunt Krynicki
  • Date: 2013-07-30 15:16:42 UTC
  • mfrom: (154.1.1 command-not-found)
  • Revision ID: zygmunt.krynicki@canonical.com-20130730151642-t1df5a22ga6ovam3
Merge fix for python3 support

Show diffs side-by-side

added added

removed removed

Lines of Context:
212
212
                answer = input(prompt)
213
213
            else:
214
214
                answer = raw_input(prompt)
215
 
            if sys.stdin.encoding and isinstance(answer, str):
216
 
                # Decode the answer so that we get an unicode value
217
 
                answer = answer.decode(sys.stdin.encoding)
 
215
                if sys.stdin.encoding and isinstance(answer, str):
 
216
                    # Decode the answer so that we get an unicode value
 
217
                    answer = answer.decode(sys.stdin.encoding)
218
218
            if answer.lower() == _("y"):
219
219
                if posix.geteuid() == 0:
220
220
                    command_prefix = ""