<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <br>
    <br>
    <div class="moz-cite-prefix">On 08/10/2015 01:47 PM, Abhijeet
      Kasurde wrote:<br>
    </div>
    <blockquote cite="mid:55C88F57.6000500@redhat.com" type="cite">Hi
      All,
      <br>
      <br>
      This patch fixes bug -
      <a class="moz-txt-link-freetext" href="https://fedorahosted.org/freeipa/ticket/3406">https://fedorahosted.org/freeipa/ticket/3406</a>
      <br>
      <br>
      Thanks,
      <br>
      Abhijeet Kasurde
      <br>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
    </blockquote>
    <br>
    Hello,<br>
    <br>
    thank you for the patch<br>
    <br>
    1)<br>
    -            except ValueError:<br>
    +            except EOFError, ValueError:<br>
    <br>
    Please use <br>
    except (EOFError, ValueError):<br>
    <a class="moz-txt-link-freetext" href="https://docs.python.org/2/tutorial/errors.html#handling-exceptions">https://docs.python.org/2/tutorial/errors.html#handling-exceptions</a><br>
    <br>
    2)<br>
    I'm not sure if this code will work (I did not test it)<br>
    <br>
    I expect when stdin is closed, this will result into infinite loop,
    because raw_input will always return EOFError.<br>
    <br>
            while True:<br>
                try:<br>
                    ret = raw_input("%s: " % prompt)<br>
                    if allow_empty or ret.strip():<br>
                        return ret<br>
                except EOFError:<br>
                    pass<br>
    <br>
  </body>
</html>