1
0
Fork 0
mirror of https://github.com/borgbase/vorta synced 2025-01-03 05:36:19 +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 self.isRunning():
if single_app: if single_app:
self.sendMessage("open main window") 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() sys.exit()
elif args.profile: elif args.profile:
self.sendMessage(f"create {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() sys.exit()
elif args.profile: elif args.profile:
sys.exit('Vorta must already be running for --create to work') sys.exit('Vorta must already be running for --create to work')