[kupfer] plugin.rst: Move import below plugin information fields



commit f5bddaceaa10874544f175b609eaeba2de635ca0
Author: Ulrik Sverdrup <ulrik sverdrup gmail com>
Date:   Mon Nov 23 21:19:15 2009 +0100

    plugin.rst: Move import below plugin information fields
    
    The RestructuredText plugin depends on python's docutils, which is not
    a core kupfer dependency. We absolutely must import it lower down, so
    that the plugin will still show in the UI (with a good explanation) if
    docutils is not installed.

 kupfer/plugin/rst.py |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/kupfer/plugin/rst.py b/kupfer/plugin/rst.py
index 2c265a7..47b6561 100644
--- a/kupfer/plugin/rst.py
+++ b/kupfer/plugin/rst.py
@@ -1,4 +1,3 @@
-import docutils.core
 import os
 
 from kupfer.objects import Source, Action, TextLeaf, FileLeaf
@@ -10,6 +9,9 @@ __description__ = _("Render reStructuredText and show the result")
 __version__ = ""
 __author__ = "Ulrik Sverdrup <ulrik sverdrup gmail com>"
 
+# docutils is a critical import -- not a core kupfer dependency
+import docutils.core
+
 class RenderView (Action):
 	def __init__(self):
 		Action.__init__(self, _("View as HTML Document"))



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