Advertisement
Guest User

Untitled

a guest
Jan 22nd, 2020
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.66 KB | None | 0 0
  1.  if not isinstance(skip_jobs,list) and (skip_jobs is not None):
  2.             return {"code": 1, "JobStatus":"Error. Incorrect 'SkipJobs' value"}
  3.         elif not isinstance(run_only,list) and (run_only is not None):
  4.             return {"code": 1, "JobStatus":"Error. Incorrect 'RunOnly' value"}
  5.  
  6.         if skip_jobs and run_only and (col.Counter(skip_jobs) == col.Counter(run_only)):
  7.             return {"code": 1, "JobStatus":"Error. CurrentJob and RunOnly lists can't have the same values"}
  8.  
  9.         if (skip_jobs and (current_job in skip_jobs)) or
  10.                 (run_only and (current_job not in run_only)):
  11.             return {"code": 0, "JobStatus":"skip"}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement