title: Failed to import extension mercurial_keyring - Rhodecode - Object has no attribute NullHandler
body: <p>Machine Env: Windows7 box with Cygwin/TortoiseHg, Linux box (RHEL).
  Mercurial/Hg - 3.0.1 version</p>
  
  <p>I'm trying to integrate mercurial_keyring to perform username/password less operations. Mercurial keyring prompts first time per user / per repository link but after that, it doesn't prompt.</p>
  
  <p>Our Hg repository code recently migrated to RhodeCode. </p>
  
  <p>I have mercurial_keyring.py (python) file available on my machine (provided by this link): <a href="https://pypi.python.org/pypi/mercurial_keyring" rel="nofollow">https://pypi.python.org/pypi/mercurial_keyring</a> and <a href="https://bitbucket.org/Mekk/mercurial_keyring/src/tip/mercurial_keyring.py" rel="nofollow">https://bitbucket.org/Mekk/mercurial_keyring/src/tip/mercurial_keyring.py</a></p>
  
  <p>While doing hg clone or any hg command, I'm getting the following error when used at command prompt (either in Linux or Windows machine via Cygwin).</p>
  
  <pre><code>*** failed to import extension hgext.mercurial_keyring from /root/AKS/goga/mercurial_keyring.py: 'module' object has no attribute 'NullHandler'
  </code></pre>
  
  <p>My ~/.hgrc file looks like:</p>
  
  <pre><code># example config (see "hg help config" for more info)
  
  [ui]
  # name and email, e.g.
  # username = Jane Doe &lt;jdoe@example.com&gt;
  username=koba &lt;koba.loki@shenzi.com&gt;
  
  [extensions]
  # uncomment these lines to enable some popular extensions
  # (see "hg help extensions" for more info)
  # pager =
  # progress =
  # color =
  hgext.mercurial_keyring = /root/AKS/goga/mercurial_keyring.py
  
  [paths]
  default = http://hg-server.cm.shenzi.com:8082
  
  [auth]
  default1.schemes = http https
  default1.prefix = hg-server:8082
  default1.username = koba
  
  default.schemes = http https
  default.prefix = hg-server.cm.shenzi.com:8082
  default.username = koba
  
  default3.schemes = http https
  default3.prefix = 12.112.91.112
  default3.username = koba
  </code></pre>
  
  <p>In Cygwin, I also got another error:</p>
  
  <pre><code>*** failed to import extension hgext.mercurial_keyring from ~/MerKeyRing/mercurial_keyring.py: No module named keyring
  </code></pre>