Skip to content

Commit

Permalink
- add test to see if there were truly no similarities between the MHL…
Browse files Browse the repository at this point in the history
… files and report it clearly
  • Loading branch information
seb26 committed Mar 23, 2019
1 parent 7b38ed0 commit c960ec4
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions mhl-compare.py
Original file line number Diff line number Diff line change
Expand Up @@ -569,6 +569,9 @@ def printCount(self):
},
'IMPOSSIBLE': {
'desc': 'anomaly -- MHL was likely modified or something unusual happened'
},
'NO_FILES_IN_COMMON': {
'desc': 'There were no files in common between these two MHLs.'
}
}
for label in outcomes.values():
Expand All @@ -581,6 +584,12 @@ def printCount(self):

print('')
print('Observations:')

# Quick check to see if both MHLs are completely and utterly different
# If all counts are zero, except missing, then there really was nothing in common.
sumCountsGenuine = sum( self.COUNT.values() ) - self.COUNT['MISSING']
if not sumCountsGenuine > 0:
print(' ' + color('There were NO files in common between these two MHL files.', LOG_COLOR_INFORMATION) )
for category, count in self.COUNT.items():
line_color = outcomes[category]['color']
if count == 0:
Expand Down

0 comments on commit c960ec4

Please sign in to comment.