mirror of
https://github.com/Garmelon/PFERD.git
synced 2026-04-13 07:55:05 +02:00
Add KeyboardInterrupt detection
This commit is contained in:
parent
35c3fa205d
commit
86062f0b3f
2 changed files with 62 additions and 53 deletions
|
|
@ -75,6 +75,7 @@ def main() -> None:
|
||||||
pferd = Pferd(Path(__file__).parent, test_run=args.test_run)
|
pferd = Pferd(Path(__file__).parent, test_run=args.test_run)
|
||||||
pferd.enable_logging()
|
pferd.enable_logging()
|
||||||
|
|
||||||
|
try:
|
||||||
if not args.synchronizers or "numerik" in args.synchronizers:
|
if not args.synchronizers or "numerik" in args.synchronizers:
|
||||||
pferd.ilias_kit(
|
pferd.ilias_kit(
|
||||||
target="Numerik",
|
target="Numerik",
|
||||||
|
|
@ -124,8 +125,12 @@ def main() -> None:
|
||||||
cookies="ilias_cookies.txt",
|
cookies="ilias_cookies.txt",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
except KeyboardInterrupt:
|
||||||
|
print("Exiting early.")
|
||||||
|
finally:
|
||||||
# Prints a summary listing all new, modified or deleted files
|
# Prints a summary listing all new, modified or deleted files
|
||||||
pferd.print_summary()
|
pferd.print_summary()
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
main()
|
main()
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,7 @@ def main() -> None:
|
||||||
pferd = Pferd(Path(__file__).parent, test_run=args.test_run)
|
pferd = Pferd(Path(__file__).parent, test_run=args.test_run)
|
||||||
pferd.enable_logging()
|
pferd.enable_logging()
|
||||||
|
|
||||||
|
try:
|
||||||
# Synchronize the personal desktop into the "ILIAS" directory.
|
# Synchronize the personal desktop into the "ILIAS" directory.
|
||||||
# It saves the cookies, so you only need to log in again when the ILIAS cookies expire.
|
# It saves the cookies, so you only need to log in again when the ILIAS cookies expire.
|
||||||
pferd.ilias_kit_personal_desktop(
|
pferd.ilias_kit_personal_desktop(
|
||||||
|
|
@ -30,6 +31,9 @@ def main() -> None:
|
||||||
cookies="ilias_cookies.txt",
|
cookies="ilias_cookies.txt",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
except KeyboardInterrupt:
|
||||||
|
print("Exiting early...")
|
||||||
|
finally:
|
||||||
# Prints a summary listing all new, modified or deleted files
|
# Prints a summary listing all new, modified or deleted files
|
||||||
pferd.print_summary()
|
pferd.print_summary()
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue