updated on Thu Jan 19 20:01:47 UTC 2012
[aur-mirror.git] / urlscan-git / urlscan.patch
blob49e39c481b0a87b00ac3d2f9cd71c8a4149a6cc0
1 diff --git a/README b/README
2 index 73425ca..5fc809e 100644
3 --- a/README
4 +++ b/README
5 @@ -8,8 +8,7 @@
6 contained in email messages. It is a replacement for the "urlview"
7 program.
9 - urlscan requires Python and the python-urwid library, as well as
10 - sensible-browser from the debianutils package.
11 + urlscan requires Python and the python-urwid library.
13 1) Features
15 @@ -38,9 +37,7 @@ macro attach,compose \cb "<pipe-entry> urlscan<Enter>" "call urlscan to extract
16 Once this is done, Control-b while reading mail in mutt will
17 automatically invoke urlscan on the message.
19 - urlscan uses sensible-browser to invoke the default Web browser of
20 -the current environment. To choose a particular browser, set the
21 -environment variable BROWSER; e.g.,
22 + To choose a particular browser, set the environment variable BROWSER; e.g.,
24 export BROWSER=/usr/bin/epiphany
26 diff --git a/modules/urlscan/browser.py b/modules/urlscan/browser.py
27 index a86a1ca..249ae62 100644
28 --- a/modules/urlscan/browser.py
29 +++ b/modules/urlscan/browser.py
30 @@ -17,11 +17,11 @@
32 '''Contains logic to invoke the default system browser.'''
34 -import os
35 +import os, subprocess
37 def browseto(url, background = False):
38 if background:
39 - mode = os.P_NOWAIT
40 + cmd = subprocess.call
41 else:
42 - mode = os.P_WAIT
43 - os.spawnl(mode, '/usr/bin/sensible-browser', '/usr/bin/sensible-browser', url)
44 + cmd = subprocess.Popen
45 + cmd([os.environ["BROWSER"], url])
46 diff --git a/setup.py b/setup.py
47 index b927174..d39afc4 100755
48 --- a/setup.py
49 +++ b/setup.py
50 @@ -1,4 +1,4 @@
51 -#!/usr/bin/env python
52 +#!/usr/bin/env python2
54 from distutils.core import setup
56 diff --git a/urlscan b/urlscan
57 index 28e8820..c8e4027 100755
58 --- a/urlscan
59 +++ b/urlscan
60 @@ -1,4 +1,4 @@
61 -#!/usr/bin/python
62 +#!/usr/bin/python2
64 # A simple urlview replacement that handles things like quoted-printable properly.
65 # aka "urlview minus teh suck"