in support/retro_contest/rest.py [0:0]
def restart_args(args, server, cookies):
if not args.yes:
yn = input('Are you sure? [y/N] ')
if yn.lower() not in ('y', 'yes'):
print('Not restarted')
return True
if args.id:
suffix = '/%d' % args.id
else:
suffix = ''
r = requests.post(server + '/rest/job/restart' + suffix, cookies=cookies)
if r.status_code == 404:
print('No job found')
return False
elif r.status_code // 100 == 2:
print('Restarted')
else:
print('Error %i occurred' % r.status_code)
return False
return True