File: meaningful-error-if-no-python3-markdown.patch

package info (click to toggle)
samba 2%3A4.17.12%2Bdfsg-0%2Bdeb12u2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bookworm-updates
  • size: 160,436 kB
  • sloc: ansic: 1,891,228; python: 221,694; sh: 66,081; xml: 52,188; perl: 35,329; makefile: 6,056; yacc: 4,106; exp: 1,582; cpp: 1,224; lex: 858; awk: 581; java: 119; csh: 58; sed: 45; asm: 30
file content (27 lines) | stat: -rw-r--r-- 1,105 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
From 545162e59916b3bd712d2e8e52063278cf2bb7ca Mon Sep 17 00:00:00 2001
From: Michael Tokarev <mjt@tls.msk.ru>
Date: Fri, 2 Dec 2022 11:08:27 +0300
Subject: print meaningful error message if python3-markdown is not installed

---
 python/samba/netcmd/domain.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/python/samba/netcmd/domain.py b/python/samba/netcmd/domain.py
index 2a548ed1ad4..cfbd602dce8 100644
--- a/python/samba/netcmd/domain.py
+++ b/python/samba/netcmd/domain.py
@@ -4133,8 +4133,8 @@ class cmd_domain_schema_upgrade(Command):
         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')
+            self.outf.write("Exception in importing markdown: %s\n" % e)
+            raise CommandError('Failed to import module markdown, please install python3-markdown package')
         from samba.schema import Schema
 
         updates_allowed_overridden = False
-- 
2.30.2