diff --git a/lib/Common b/lib/Common index eab3d7d..41826c4 160000 --- a/lib/Common +++ b/lib/Common @@ -1 +1 @@ -Subproject commit eab3d7d1ae9ddf4a808c5af33bc716c7b56b2741 +Subproject commit 41826c4db4caf56909097ab8cec81ad0e6d7e840 diff --git a/vk-backup.py b/vk-backup.py index b071898..5083c0c 100755 --- a/vk-backup.py +++ b/vk-backup.py @@ -1,6 +1,6 @@ #!/usr/bin/python # -*- coding: UTF-8 -*- -'''VK-Backup 0.8.0 +'''VK-Backup 0.8.1 Author: Rabit License: GPL v3 @@ -15,6 +15,7 @@ from lib import vk_auth import getpass, os +from sys import exit c.init_begin(__doc__) c.option('-u', '--user', type='string', dest='user', metavar='EMAIL', default=None, help='vk.com account user email (@) (required)') @@ -24,13 +25,15 @@ c.init_end() if c.cfg('user') == None: - parser.error('Unable to get email from the user option') + c.log('error', 'Unable to get email from the user option') + exit(1) if c.cfg('password') == None: c.cfg('password', getpass.getpass()) if c.cfg('download-threads') < 0: - parser.error('Number of download threads can\'t be lower then zero') + c.log('error', 'Number of download threads can\'t be lower then zero') + exit(1) class Backup: def __init__(self):