summaryrefslogtreecommitdiff
path: root/python/samba/netcmd
diff options
context:
space:
mode:
authorAmit Kumar <amitkuma@redhat.com>2019-09-02 04:26:08 -0500
committerRalph Boehme <slow@samba.org>2019-10-22 19:39:40 +0000
commitce3fdc4dee373a2f9ab55ffa83a97ac690109b09 (patch)
tree9055dbc2f0690012eecd13682f59583939c4101d /python/samba/netcmd
parent799b05cf7f9e49db71a731fdf9264311703fd3cf (diff)
downloadsamba-ce3fdc4dee373a2f9ab55ffa83a97ac690109b09.tar.gz
samba-tool domain: fix an unhandled exception
Uncaught exception on running 'samba-tool domain schemaupgrade' ERROR(<class 'ModuleNotFoundError'>): uncaught exception - No module named 'markdown' File "/usr/lib64/python3.7/site-packages/samba/netcmd/__init__.py", line 185, in _run return self.run(*args, **kwargs) File "/usr/lib64/python3.7/site-packages/samba/netcmd/domain.py", line 4157, in run from samba.ms_schema_markdown import read_ms_markdown File "/usr/lib64/python3.7/site-packages/samba/ms_schema_markdown.py", line 26, in <module> import markdown Signed-off-by: Amit Kumar amitkuma@redhat.com Reviewed-by: Ralph Boehme <slow@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'python/samba/netcmd')
-rw-r--r--python/samba/netcmd/domain.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/python/samba/netcmd/domain.py b/python/samba/netcmd/domain.py
index 9d44d6d5ea4..80811154d4d 100644
--- a/python/samba/netcmd/domain.py
+++ b/python/samba/netcmd/domain.py
@@ -4110,7 +4110,11 @@ class cmd_domain_schema_upgrade(Command):
return count
def run(self, **kwargs):
- from samba.ms_schema_markdown import read_ms_markdown
+ try:
+ from samba.ms_schema_markdown import read_ms_markdown
+ except ImportError as e:
+ self.outf.write("Exception in importing markdown: %s" % e)
+ raise CommandError('Failed to import module markdown')
from samba.schema import Schema
updates_allowed_overridden = False