diff options
Diffstat (limited to 'bitbake/lib/toaster/orm/models.py')
-rw-r--r-- | bitbake/lib/toaster/orm/models.py | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/bitbake/lib/toaster/orm/models.py b/bitbake/lib/toaster/orm/models.py index b3f8db9750..6b485d2ac4 100644 --- a/bitbake/lib/toaster/orm/models.py +++ b/bitbake/lib/toaster/orm/models.py | |||
@@ -269,11 +269,10 @@ class Project(models.Model): | |||
269 | except ProjectVariable.DoesNotExist: | 269 | except ProjectVariable.DoesNotExist: |
270 | pass | 270 | pass |
271 | br.save() | 271 | br.save() |
272 | except Exception as e: | 272 | except Exception: |
273 | # revert the build request creation since we're not done cleanly | ||
273 | br.delete() | 274 | br.delete() |
274 | import sys | 275 | raise |
275 | et, ei, tb = sys.exc_info() | ||
276 | raise type(e), e, tb | ||
277 | return br | 276 | return br |
278 | 277 | ||
279 | class Build(models.Model): | 278 | class Build(models.Model): |
@@ -364,7 +363,7 @@ class BuildArtifact(models.Model): | |||
364 | 363 | ||
365 | 364 | ||
366 | def is_available(self): | 365 | def is_available(self): |
367 | return build.buildrequest.environment.has_artifact(file_path) | 366 | return self.build.buildrequest.environment.has_artifact(self.file_name) |
368 | 367 | ||
369 | class ProjectTarget(models.Model): | 368 | class ProjectTarget(models.Model): |
370 | project = models.ForeignKey(Project) | 369 | project = models.ForeignKey(Project) |
@@ -981,12 +980,10 @@ class LayerIndexLayerSource(LayerSource): | |||
981 | if 'inherits' in ri: | 980 | if 'inherits' in ri: |
982 | ro.is_image = 'image' in ri['inherits'].split() | 981 | ro.is_image = 'image' in ri['inherits'].split() |
983 | ro.save() | 982 | ro.save() |
984 | except: | 983 | except Exception: |
985 | #print "Duplicate Recipe, ignoring: ", vars(ro) | 984 | logger.warning("Duplicate Recipe, ignoring: %s " % vars(ro)) |
986 | pass | ||
987 | if not connection.features.autocommits_when_autocommit_is_off: | 985 | if not connection.features.autocommits_when_autocommit_is_off: |
988 | transaction.set_autocommit(True) | 986 | transaction.set_autocommit(True) |
989 | pass | ||
990 | 987 | ||
991 | class BitbakeVersion(models.Model): | 988 | class BitbakeVersion(models.Model): |
992 | 989 | ||