mirror of
https://github.com/vikstrous/pirate-get
synced 2025-01-10 10:04:21 +01:00
add check for missing local database file
This commit is contained in:
parent
127bf8bdfb
commit
e80155f744
@ -322,7 +322,12 @@ def pirate_main(args):
|
||||
# fetch torrents
|
||||
|
||||
if args.source == 'local_tpb':
|
||||
if os.path.isfile(args.database):
|
||||
results = pirate.local.search(args.database, args.search)
|
||||
else:
|
||||
printer.print("Local pirate bay database doesn't exist.",
|
||||
'(%s)' % args.database, color='ERROR')
|
||||
sys.exit(1)
|
||||
elif args.source == 'tpb':
|
||||
try:
|
||||
results, site = search_mirrors(printer, args)
|
||||
|
Loading…
Reference in New Issue
Block a user