diff options
Diffstat (limited to 'lib/toaster/orm/models.py')
-rw-r--r-- | lib/toaster/orm/models.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/toaster/orm/models.py b/lib/toaster/orm/models.py index 8a9a21eee..198c6f5d2 100644 --- a/lib/toaster/orm/models.py +++ b/lib/toaster/orm/models.py @@ -782,8 +782,11 @@ class LayerIndexLayerSource(LayerSource): print "EE: could not connect to %s, skipping update: %s\n%s" % (self.apiurl, e, traceback.format_exc(e)) return - # update branches; only those that we already have names listed in the Releases table + # update branches; only those that we already have names listed in the + # Releases table whitelist_branch_names = map(lambda x: x.branch_name, Release.objects.all()) + if len(whitelist_branch_names) == 0: + raise Exception("Failed to make list of branches to fetch") print "Fetching branches" branches_info = _get_json_response(apilinks['branches'] |