Skip to content

Commit c0f308f

Browse files
committed
#35 cleaned up the usage of verbosity
1 parent 402a75f commit c0f308f

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

about.py

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -890,11 +890,11 @@ def __init__(self, input_path, output_path, verbosity):
890890
self.output_path = output_path
891891

892892
# Setup the verbosity
893-
self.display_error = self.display_error_and_warning = False
894-
if verbosity == 1:
893+
self.display_error = self.display_warning = False
894+
if verbosity >= 1:
895895
self.display_error = True
896-
elif verbosity == 2:
897-
self.display_error_and_warning = True
896+
elif verbosity >= 2:
897+
self.display_warning = True
898898

899899
self.about_files = []
900900
self.about_objects = []
@@ -963,15 +963,14 @@ def extract_about_info(self):
963963
about_data_list.append(about_object.get_about_info(update_path,
964964
about_object))
965965

966-
if self.display_error:
967-
if about_object.errors:
968-
print("ABOUT File: %s" % update_path)
969-
print("ERROR: %s\n" % about_object.errors)
970-
if self.display_error_and_warning:
966+
if self.display_error or self.display_warning:
971967
if about_object.errors or about_object.warnings:
972968
print("ABOUT File: %s" % update_path)
969+
970+
if self.display_error:
973971
if about_object.errors:
974-
print("ERROR: %s" % about_object.errors)
972+
print("ERROR: %s\n" % about_object.errors)
973+
if self.display_warning:
975974
if about_object.warnings:
976975
print("WARNING: %s\n" % about_object.warnings)
977976

0 commit comments

Comments
 (0)