don't print message if no replacements were made

This commit is contained in:
Holly 2019-08-20 20:01:36 -04:00
parent ad3b974f91
commit 7187f1cef0
1 changed files with 2 additions and 1 deletions

View File

@ -19,7 +19,8 @@ def main(args):
with open(args[0]) as code:
filenames = get_includes(code.read())
subs = sum((fix_section_name(file) for file in filenames))
print("Fixed {} deprecated section name{}.".format(subs, '' if subs == 1 else 's'))
if subs:
print("Fixed {} deprecated section name{}.".format(subs, '' if subs == 1 else 's'))
if __name__ == "__main__":