compare_pkglist: fallback to old route if submitfrom and submitto has not defined

This commit is contained in:
Max Lin 2017-12-04 16:22:18 +08:00
parent 913531e12b
commit 9f5a0aa079

View File

@ -133,12 +133,13 @@ class CompareList(object):
if (self.submitfrom and not self.submitto) or (self.submitto and not self.submitfrom): if (self.submitfrom and not self.submitto) or (self.submitto and not self.submitfrom):
print("** Please give both --submitfrom and --submitto parameter **") print("** Please give both --submitfrom and --submitto parameter **")
return return
if not self.item_exists(self.submitfrom): if self.submitfrom and self.submitto:
print("Project %s is not exist"%self.submitfrom) if not self.item_exists(self.submitfrom):
return print("Project %s is not exist"%self.submitfrom)
if not self.item_exists(self.submito): return
print("Project %s is not exist"%self.submitto) if not self.item_exists(self.submito):
return print("Project %s is not exist"%self.submitto)
return
# get souce packages from target # get souce packages from target
print 'Gathering the package list from %s' % self.old_prj print 'Gathering the package list from %s' % self.old_prj