From d2065ea40bfbd1ebd9288a0a42126e10fa5a52c5 Mon Sep 17 00:00:00 2001 From: ZhuoX Li Date: Tue, 24 Jun 2014 10:53:55 +0800 Subject: [PATCH] Add 'unknown' state into the filter regular of generating snapshot. When some targets of OBS project are disabled, maybe get the 'unknown' status, we also should ignore it ,to create snapshot/prerelease repos. Change-Id: I1caa47b31e2d82043a5dd25ffbd953901dad90ab --- job_create_snapshot.py | 6 +++--- job_pre_release_obs.py | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/job_create_snapshot.py b/job_create_snapshot.py index 169859b..5ab3cde 100755 --- a/job_create_snapshot.py +++ b/job_create_snapshot.py @@ -152,9 +152,9 @@ def main(): # them not published repo_status = build.get_repo_state(project) for target_arch, status in repo_status.items(): - if status not in ['published', 'unpublished']: - print "The project: %s target: %s repo isn't published yet" \ - % (project, target_arch) + if status not in ['published', 'unpublished', 'unknown']: + print "The project: %s target: %s repo is still under %s, " \ + "skip now" % (project, target_arch, status) return 0 diff --git a/job_pre_release_obs.py b/job_pre_release_obs.py index b95dae3..929f322 100755 --- a/job_pre_release_obs.py +++ b/job_pre_release_obs.py @@ -244,10 +244,10 @@ def main(action): # them not published repo_status = build.get_repo_state(project) for target_arch, status in repo_status.items(): - if status not in ['published', 'unpublished']: + if status not in ['published', 'unpublished', 'unknown']: print "Skipping prerelease repository creation as OBS "\ - "repository: %s/%s/%s is't published yet." \ - % (project, repo, target_arch) + "repository: %s/%s/%s is still under %s, skip now." \ + % (project, repo, target_arch, status) return 0 -- 2.7.4