mirror of
https://github.com/samba-team/samba.git
synced 2025-12-14 20:23:54 +03:00
python:samba: Raise an exception if we can’t parse a Markdown operation
Otherwise we would continue with the wrong GUID and filename. Signed-off-by: Jennifer Sutton <jennifersutton@catalyst.net.nz> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
This commit is contained in:
committed by
Douglas Bagnall
parent
c88164ee68
commit
32bfbc788d
@@ -253,10 +253,11 @@ def read_ms_markdown(in_file, out_folder=None, out_dict=None):
|
||||
if updates:
|
||||
for update in updates[2:]:
|
||||
output = re.match(r'Operation (\d+): {(.*)}', update[0])
|
||||
if output:
|
||||
# print output.group(1), output.group(2)
|
||||
guid = output.group(2)
|
||||
filename = "%s-{%s}.ldif" % (output.group(1).zfill(4), guid)
|
||||
if not output:
|
||||
raise Exception(update)
|
||||
|
||||
guid = output.group(2)
|
||||
filename = "%s-{%s}.ldif" % (output.group(1).zfill(4), guid)
|
||||
|
||||
found = False
|
||||
|
||||
|
||||
Reference in New Issue
Block a user