title: Does IMAP "LIST" command return "NO" code
body: <p>I'm implementing on top of <code>imap</code> python builtin library and I'm trying to find if <code>IMAP4.list([directory[, pattern]])</code> method can return <code>NO</code> code and when.</p>
  <p>According to the RFC, it could.</p>
  <p>Exemple of code :</p>
  <pre class="lang-py prettyprint-override"><code>from imaplib import IMAP4_SSL
  
  with IMAP4_SSL(host=IMAP_SERVER) as imap_connection:
    imap_connection.login(USERNAME, PASSWORD)
    
    code, data = imap_connection.list()
  
    if code == &quot;NO&quot;:
      print(&quot;Does this case exists ?&quot;)
  
  </code></pre>
  <p><a href="https://www.rfc-editor.org/rfc/rfc3501" rel="nofollow noreferrer">IMAP RFC</a>
  <a href="https://docs.python.org/3/library/imaplib.html#imaplib.IMAP4.list" rel="nofollow noreferrer">Python imaplib</a></p>