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
|
# fetch torrents
|
||||||
|
|
||||||
if args.source == 'local_tpb':
|
if args.source == 'local_tpb':
|
||||||
results = pirate.local.search(args.database, args.search)
|
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':
|
elif args.source == 'tpb':
|
||||||
try:
|
try:
|
||||||
results, site = search_mirrors(printer, args)
|
results, site = search_mirrors(printer, args)
|
||||||
|
Loading…
Reference in New Issue
Block a user