Late import `keyring` to avoid slow downs.

* Double to single quotes
* Catch proper exception
Merge pull request #12368 from s0undt3ch/hotfix/lazy-load-keyring

Late import `keyring` to avoid slow downs.