1
0
Fork 0
mirror of https://github.com/borgbase/vorta synced 2024-12-21 23:33:13 +00:00

Replace print with logging in application.py (#1612)

Log `An instance of Vorta is already running. Opening main window.` and `Creating backup using existing Vorta instance.` with severity *info* instead of printing it.

* src/vorta/application.py (VortaApp.__init__)
This commit is contained in:
Divyansh Singh 2023-03-08 22:17:50 +05:30 committed by GitHub
parent e07c022ca3
commit b01fa1056a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -46,11 +46,11 @@ def __init__(self, args_raw, single_app=False):
if self.isRunning():
if single_app:
self.sendMessage("open main window")
print('An instance of Vorta is already running. Opening main window.')
logger.info('An instance of Vorta is already running. Opening main window.')
sys.exit()
elif args.profile:
self.sendMessage(f"create {args.profile}")
print('Creating backup using existing Vorta instance.')
logger.info('Creating backup using existing Vorta instance.')
sys.exit()
elif args.profile:
sys.exit('Vorta must already be running for --create to work')