Python webbrowser module sometimes fails to open url in Chrome

I have Chrome configured as my default browser, on Mountain Lion.

At the end of my Python 2.7.4 program I have the following:

import webbrowser
webbrowser.open('http://example.com')

Sometimes instead of opening the tab as the documentation suggests will happen this command will focus Google Chrome, without opening the URL in a new tab.

I'm not even sure where to start debugging this (there are no errors on the Python side, at least). I'd appreciate some ideas about where to start looking.


ANSWERS:


It looks like there's Chrome specific code in the webbrowser 2.7 source code:

However when I opened the Python file on my computer, it was running an earlier version of the webbrowser.py source code, without the Chrome specific flags.

I updated the source code on my system with the latest code (from the website) and it's running in Chrome without any problems.

It's also been fixed in Python 3.3, I am assured.



 MORE:


 ? Python: open "chrome://" urls?
 ? Open URLs in Chrome Notifications
 ? Opening Chrome with Python / Mechanize
 ? Chrome extension,force chrome to open url on start
 ? Selenium won't open a new URL in a new tab (Python & Chrome)
 ? Selenium & Chromedriver - PHP Webdrivers lack correct quit method, just close() - what wire protocol commands do other languages like Java send?
 ? Selenium & Chromedriver - PHP Webdrivers lack correct quit method, just close() - what wire protocol commands do other languages like Java send?
 ? Selenium & Chromedriver - PHP Webdrivers lack correct quit method, just close() - what wire protocol commands do other languages like Java send?
 ? Webdriver randomly produces 'chrome not reachable' on Linux tests
 ? Submit button not working in Selenium webdriver