main: no workers catch v2
This commit is contained in:
parent
7162849f0c
commit
6d90a3b15c
@ -152,9 +152,11 @@ def list_workers():
|
||||
workers = workers_file.readlines()
|
||||
workers_file.close()
|
||||
|
||||
# Check if there are any workers
|
||||
# Check if there are any workers (by seeing if there are any :)
|
||||
if len(workers) == 0:
|
||||
return jsonify({'error': 'No workers available', 'success': 'false'})
|
||||
if not worker.contains(':'):
|
||||
return jsonify({'error': 'No workers available', 'success': 'false'})
|
||||
|
||||
worker_list = []
|
||||
for worker in workers:
|
||||
|
Loading…
Reference in New Issue
Block a user