[PATCH] plugin.google: Check if searchplugins dirs exists



---
 kupfer/plugin/google.py |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/kupfer/plugin/google.py b/kupfer/plugin/google.py
index 0a88865..ead8e1d 100644
--- a/kupfer/plugin/google.py
+++ b/kupfer/plugin/google.py
@@ -184,6 +184,8 @@ class OpenSearchSource (Source):
  # files are unique by filename to allow override
  visited_files = set()
  for pdir in plugin_dirs:
+ if not os.path.exists(pdir):
+ continue
  for f in os.listdir(pdir):
  if f in visited_files:
  continue
-- 
1.6.3.3

--00032555a89acc57c30474991000
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<div>From 1fddf62bb4c63b3d40f09964143bb84a4286f8cf Mon Sep 17 00:00:00 2001=
</div><div>From: Francesco Marella &lt;<a href=3D"mailto:francesco marella =
gmail.com">francesco marella gmail com</a>&gt;</div><div>Date: Mon, 28 Sep =
2009 02:35:52 +0200</div>

<div>Subject: [PATCH] plugin.google: Check if searchplugins dirs exists</di=
v><div><br></div><div>---</div><div>=A0kupfer/plugin/google.py | =A0 =A02 +=
+</div><div>=A01 files changed, 2 insertions(+), 0 deletions(-)</div><div><=
br>
</div>
<div>diff --git a/kupfer/plugin/google.py b/kupfer/plugin/google.py</div><d=
iv>index 0a88865..ead8e1d 100644</div><div>--- a/kupfer/plugin/google.py</d=
iv><div>+++ b/kupfer/plugin/google.py</div><div>@@ -184,6 +184,8 @@ class O=
penSearchSource (Source):</div>

<div>=A0<span class=3D"Apple-tab-span" style=3D"white-space:pre">		</span>#=
 files are unique by filename to allow override</div><div>=A0<span class=3D=
"Apple-tab-span" style=3D"white-space:pre">		</span>visited_files =3D set()=
</div><div>

=A0<span class=3D"Apple-tab-span" style=3D"white-space:pre">		</span>for pd=
ir in plugin_dirs:</div><div>+<span class=3D"Apple-tab-span" style=3D"white=
-space:pre">			</span>if not os.path.exists(pdir):</div><div>+<span class=
=3D"Apple-tab-span" style=3D"white-space:pre">				</span>continue</div>

<div>=A0<span class=3D"Apple-tab-span" style=3D"white-space:pre">			</span>=
for f in os.listdir(pdir):</div><div>=A0<span class=3D"Apple-tab-span" styl=
e=3D"white-space:pre">				</span>if f in visited_files:</div><div>=A0<span =
class=3D"Apple-tab-span" style=3D"white-space:pre">					</span>continue</di=
v>

<div>--=A0</div><div>1.6.3.3</div><div><br></div>

--00032555a89acc57c30474991000--


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]