From: Hasan Wan Date: Thu, 31 Oct 2013 03:03:41 +0000 (+0000) Subject: Fix an error with the project init X-Git-Tag: 0.15~70 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e5962dc5e0e5eae8e383456af49e4ddc4bf08180;p=services%2Fjenkins-scripts.git Fix an error with the project init Change-Id: Ic979ab0574df02b23b65f3f9374a2b7bf30fdfc0 Signed-off-by: Hasan Wan --- diff --git a/common/snapshot.py b/common/snapshot.py index 4d422fd..f3dd4aa 100644 --- a/common/snapshot.py +++ b/common/snapshot.py @@ -9,6 +9,7 @@ import os from datetime import datetime from common.backenddb import BackendDBError +from common.backenddb import EntityError from common.repomaker import ARCH_MAP @@ -123,7 +124,12 @@ class Snapshot(object): def inc(self): """Increment stapshot.""" - sdtime, snum = self.release_id.split('.') + try: + sdtime, snum = self.release_id.split('.') + except EntityError: + sdtime = None + snum = 0 + cdtime = datetime.now().strftime("%Y%m%d") if sdtime == cdtime: # datetime is the same - increment the number