Skip to content

Commit

Permalink
Fixed non-existent variable
Browse files Browse the repository at this point in the history
  • Loading branch information
Kaszanas committed Jun 8, 2022
1 parent 65aab67 commit 67aa54e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions src/directory_flattener.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,9 @@ def directory_flattener(input_path: str, output_path: str, file_extension: str)
shutil.copy(current_file, new_path_and_filename)
logging.debug("File copied")
else:
logging.error("File does not exist. Path len: %d", len(current_file))
logging.error(
"File does not exist. Path len: %d", len(current_file)
)

# Add to a mapping
dir_structure_mapping[unique_filename_with_ext] = relative_file
Expand Down Expand Up @@ -102,13 +104,13 @@ def directory_flattener(input_path: str, output_path: str, file_extension: str)
"--log",
type=str,
help="Log level (INFO, DEBUG, ERROR)",
default="WARN"
default="WARN",
)
args = parser.parse_args()

numeric_level = getattr(logging, args.log.upper(), None)
if not isinstance(numeric_level, int):
raise ValueError('Invalid log level: %s' % loglevel)
raise ValueError("Invalid log level: %s" % numeric_level)
logging.basicConfig(level=numeric_level)

args_input_path = args.input_path
Expand Down
2 changes: 1 addition & 1 deletion src/sc2_replaypack_processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ def multiproc_replaypack_processor(

numeric_level = getattr(logging, args.log.upper(), None)
if not isinstance(numeric_level, int):
raise ValueError("Invalid log level: %s" % loglevel)
raise ValueError("Invalid log level: %s" % numeric_level)
logging.basicConfig(level=numeric_level)

args_input_dir = args.input_dir
Expand Down

0 comments on commit 67aa54e

Please sign in to comment.