Format
This commit is contained in:
parent
73913c6b9e
commit
5a547bccbf
1 changed files with 15 additions and 5 deletions
20
src/main.py
20
src/main.py
|
|
@ -34,7 +34,11 @@ def __get_log_version(today: date) -> int:
|
||||||
|
|
||||||
|
|
||||||
def main(
|
def main(
|
||||||
source: Path, destination: Path, ignore_pattern: str, log_level: LogLevel, log_output: Path
|
source: Path,
|
||||||
|
destination: Path,
|
||||||
|
ignore_pattern: str,
|
||||||
|
log_level: LogLevel,
|
||||||
|
log_output: Path,
|
||||||
) -> None:
|
) -> None:
|
||||||
"""
|
"""
|
||||||
Main method for this entire program
|
Main method for this entire program
|
||||||
|
|
@ -149,10 +153,16 @@ if __name__ == "__main__":
|
||||||
log_output = Path(args.log_output)
|
log_output = Path(args.log_output)
|
||||||
|
|
||||||
if not source.is_dir():
|
if not source.is_dir():
|
||||||
print(f"Argument source resolves to {source.resolve().absolute()}, which is not a directory.")
|
print(
|
||||||
elif destination.exists() and not destination.is_dir():
|
f"Argument source resolves to {source.resolve().absolute()}, which is not a directory."
|
||||||
print(f"Argument destination resolves to {destination.resolve().absolute()}, which is not a directory.")
|
)
|
||||||
|
elif destination.exists() and not destination.is_dir():
|
||||||
|
print(
|
||||||
|
f"Argument destination resolves to {destination.resolve().absolute()}, which is not a directory."
|
||||||
|
)
|
||||||
elif log_output.exists() and not log_output.is_dir():
|
elif log_output.exists() and not log_output.is_dir():
|
||||||
print(f"Argument log_output resolves to {log_output.resolve().absolute()}, which is not a directory.")
|
print(
|
||||||
|
f"Argument log_output resolves to {log_output.resolve().absolute()}, which is not a directory."
|
||||||
|
)
|
||||||
else:
|
else:
|
||||||
main(source, destination, args.ignore_pattern, args.log_level, log_output)
|
main(source, destination, args.ignore_pattern, args.log_level, log_output)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue