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.enable_logging()
|
||||
|
||||
try:
|
||||
if not args.synchronizers or "numerik" in args.synchronizers:
|
||||
pferd.ilias_kit(
|
||||
target="Numerik",
|
||||
|
|
@ -124,8 +125,12 @@ def main() -> None:
|
|||
cookies="ilias_cookies.txt",
|
||||
)
|
||||
|
||||
except KeyboardInterrupt:
|
||||
print("Exiting early.")
|
||||
finally:
|
||||
# Prints a summary listing all new, modified or deleted files
|
||||
pferd.print_summary()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@ def main() -> None:
|
|||
pferd = Pferd(Path(__file__).parent, test_run=args.test_run)
|
||||
pferd.enable_logging()
|
||||
|
||||
try:
|
||||
# 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.
|
||||
pferd.ilias_kit_personal_desktop(
|
||||
|
|
@ -30,6 +31,9 @@ def main() -> None:
|
|||
cookies="ilias_cookies.txt",
|
||||
)
|
||||
|
||||
except KeyboardInterrupt:
|
||||
print("Exiting early...")
|
||||
finally:
|
||||
# Prints a summary listing all new, modified or deleted files
|
||||
pferd.print_summary()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue