improve handling of wrong urls

- adapt tests
- improve messages for files
- show red box camera
This commit is contained in:
scito 2022-12-31 11:32:07 +01:00
parent 4c0bb8dc61
commit f731530f57
5 changed files with 177 additions and 90 deletions

View file

@ -134,3 +134,7 @@ def replace_escaped_octal_utf8_bytes_with_str(str: str) -> str:
def quick_and_dirty_workaround_encoding_problem(str: str) -> str:
return re.sub(r'name: "encoding: .*$', '', str, flags=re.MULTILINE)
def count_files_in_dir(path: PathLike) -> int:
return len([name for name in os.listdir(path) if os.path.isfile(os.path.join(path, name))])