| |
@@ -661,14 +661,14 @@
|
| |
MLDIF = open(opts['mldif'], "r")
|
| |
except Exception as e:
|
| |
print('Failed to open Master LDIF: ' + str(e))
|
| |
- return None
|
| |
+ return
|
| |
|
| |
try:
|
| |
RLDIF = open(opts['rldif'], "r")
|
| |
except Exception as e:
|
| |
print('Failed to open Replica LDIF: ' + str(e))
|
| |
MLDIF.close()
|
| |
- return None
|
| |
+ return
|
| |
|
| |
# Verify LDIF Files
|
| |
try:
|
| |
@@ -679,7 +679,7 @@
|
| |
print('Master LDIF file in invalid, aborting...')
|
| |
MLDIF.close()
|
| |
RLDIF.close()
|
| |
- return None
|
| |
+ return
|
| |
try:
|
| |
if opts['verbose']:
|
| |
print("Validating Replica ldif file ({})...".format(opts['rldif']))
|
| |
@@ -688,7 +688,7 @@
|
| |
print('Replica LDIF file is invalid, aborting...')
|
| |
MLDIF.close()
|
| |
RLDIF.close()
|
| |
- return None
|
| |
+ return
|
| |
|
| |
# Get all the dn's, and entry counts
|
| |
if opts['verbose']:
|
| |
@@ -845,10 +845,13 @@
|
| |
final_report += ('=====================================================\n\n')
|
| |
for diff in diff_report:
|
| |
final_report += ('%s\n' % (diff))
|
| |
- if missing_report == "" and len(diff_report) == 0 and m_count == r_count:
|
| |
- final_report += ('\nResult\n')
|
| |
- final_report += ('=====================================================\n\n')
|
| |
- final_report += ('No differences between Master and Replica\n')
|
| |
+
|
| |
+ final_report += ('\nResult\n')
|
| |
+ final_report += ('=====================================================\n\n')
|
| |
+ if missing_report == "" and len(diff_report) == 0:
|
| |
+ final_report += ('No replication differences between Master and Replica\n')
|
| |
+ else:
|
| |
+ final_report += ('There are replication differences between Master and Replica\n')
|
| |
|
| |
if output_file:
|
| |
output_file.write(final_report)
|
| |
@@ -1130,10 +1133,12 @@
|
| |
for diff in report['diff']:
|
| |
final_report += ('%s\n' % (diff))
|
| |
|
| |
- if not missing and len(report['diff']) == 0 and report['m_count'] == report['r_count']:
|
| |
- final_report += ('\nResult\n')
|
| |
- final_report += ('=====================================================\n\n')
|
| |
- final_report += ('No differences between Master and Replica\n')
|
| |
+ final_report += ('\nResult\n')
|
| |
+ final_report += ('=====================================================\n\n')
|
| |
+ if not missing and len(report['diff']) == 0:
|
| |
+ final_report += ('No replication differences between Master and Replica\n')
|
| |
+ else:
|
| |
+ final_report += ('There are replication differences between Master and Replica\n')
|
| |
|
| |
if output_file:
|
| |
output_file.write(final_report)
|
| |
Description:
Previously we only printed a "Result Summary" if there were no inconsistencies and the entry counts matched. However, the entry counts do not need to match. So this made the "Result Summary" checks too strict, and if things were out of sync there was no Result Summary printed at all. This fix just always prints a result summary and it removes the entry count check.
https://pagure.io/389-ds-base/issue/50413