Update year to 2009 in various places
[zeroinstall/zeroinstall-rsl.git] / zeroinstall / 0launch-gui / browser.py
blobfe277412ad3e8c2f53dc624541b62d620aa5440c
1 # Copyright (C) 2009, Thomas Leonard
2 # See the README file for details, or visit http://0install.net.
4 import os, sys
6 def open_in_browser(link):
7 browser = os.environ.get('BROWSER', 'firefox')
8 child = os.fork()
9 if child == 0:
10 # We are the child
11 try:
12 os.spawnlp(os.P_NOWAIT, browser, browser, link)
13 os._exit(0)
14 except Exception, ex:
15 print >>sys.stderr, "Error", ex
16 os._exit(1)
17 os.waitpid(child, 0)