Merged celdredge/hgext.markdown into default
    
        | author | Constantine Linnick <theaspect@gmail.com> | 
    
        | date | Tue, 08 Oct 2013 00:31:38 +0700 | 
    
    
        | parents | 5a8c3dda25ee 
(current diff)
61b435d17646 
(diff) | 
    
        | children | 42f23a3f2f1b | 
    
        | branches/tags | (none) | 
    
        | files | __init__.py | 
Changes
    
--- a/__init__.py	Tue Oct 08 00:02:43 2013 +0700
+++ b/__init__.py	Tue Oct 08 00:31:38 2013 +0700
@@ -196,11 +196,13 @@
 
     try:
         from markdown import Markdown
-        global Markdown
     except ImportError:
         dir = os.path.dirname(os.path.realpath(__file__))
         md = ui.config("web", "markdown.egg", "Markdown-2.3.1")
         ui.debug("Markdown not found search for egg in local dir %s for %s.zip\n" % (dir, md))
         sys.path.append(os.path.join(dir, "%s.zip\%s" % (md, md)))
-        from markdown import Markdown
-        global Markdown
+        try:
+            from markdown import Markdown
+        except ImportError:
+            ui.error("Unable to locate markdown in path %s" % sys.path)
+    global Markdown