Small fix for a patch from last email



Small fix: don't export the ImportError exception when the ecal module
isn't available.

--
Lauro Moura ("lmoura" on Freenode)
http://lauro.wordpress.com
Index: src/__init__.py
===================================================================
--- src/__init__.py	(revision 0)
+++ src/__init__.py	(revision 0)
@@ -0,0 +1,25 @@
+# -*- Mode: Python; py-indent-offset: 4 -*-
+# evolution-python - Python bindings to libecal and libebook.
+# Copyright (C) 2007 John Stowers <john stowers gmail com>
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+# USA
+
+import ebook
+
+try:
+    import ecal
+except ImportError:
+    ecal = None


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