Ignore:
Timestamp:
Mar 29, 2018, 8:05:12 PM (7 years ago)
Author:
joergs
Message:

prevent a problem when none prior jobs are found

File:
1 edited

Legend:

Unmodified
Added
Removed
  • people/joerg.steffens/technical/bareos/triggerjob/triggerjob.py

    r1231 r1240  
    2424        else:
    2525            jobs = director.call('list jobs client={} hours=24'.format(client))['jobs']
    26             job = director.call('list jobs client={} hours=24 last'.format(client))['jobs'][0]
    2726            if jobs:
     27                job = director.call('list jobs client={} hours=24 last'.format(client))['jobs'][0]
    2828                jobinfo = '{starttime}: jobid={jobid}, level={level}, status={jobstatus}'.format(**job)
    2929                print('{}: skipped, recent backups available ({})'.format(jobname, jobinfo))
Note: See TracChangeset for help on using the changeset viewer.