diff options
author | Patrick Williams <patrick@stwcx.xyz> | 2015-09-22 16:09:05 +0300 |
---|---|---|
committer | Patrick Williams <patrick@stwcx.xyz> | 2015-09-22 16:09:05 +0300 |
commit | 3445365503e1e4d5601acf7c05609cc9673ec414 (patch) | |
tree | 7eb70c5bab200b0515a1b4d16873a75855df4c89 /yocto-poky/bitbake/lib/toaster/bldcontrol/management/commands/runbuilds.py | |
parent | d10502479a70bd72ca4e09569b6ee738875e4823 (diff) | |
parent | d7e963193b4e6541206a320316a158a65f1fee89 (diff) | |
download | openbmc-3445365503e1e4d5601acf7c05609cc9673ec414.tar.xz |
Merge commit 'd7e963193b4e6541206a320316a158a65f1fee89' into HEAD
Diffstat (limited to 'yocto-poky/bitbake/lib/toaster/bldcontrol/management/commands/runbuilds.py')
-rw-r--r-- | yocto-poky/bitbake/lib/toaster/bldcontrol/management/commands/runbuilds.py | 24 |
1 files changed, 2 insertions, 22 deletions
diff --git a/yocto-poky/bitbake/lib/toaster/bldcontrol/management/commands/runbuilds.py b/yocto-poky/bitbake/lib/toaster/bldcontrol/management/commands/runbuilds.py index c3e9b74c0..718e1441d 100644 --- a/yocto-poky/bitbake/lib/toaster/bldcontrol/management/commands/runbuilds.py +++ b/yocto-poky/bitbake/lib/toaster/bldcontrol/management/commands/runbuilds.py @@ -77,31 +77,11 @@ class Command(NoArgsCommand): bec.be.save() def archive(self): - ''' archives data from the builds ''' - artifact_storage_dir = ToasterSetting.objects.get(name="ARTIFACTS_STORAGE_DIR").value for br in BuildRequest.objects.filter(state = BuildRequest.REQ_ARCHIVE): - # save cooker log if br.build == None: br.state = BuildRequest.REQ_FAILED - br.save() - continue - build_artifact_storage_dir = os.path.join(artifact_storage_dir, "%d" % br.build.pk) - try: - os.makedirs(build_artifact_storage_dir) - except OSError as ose: - if "File exists" in str(ose): - pass - else: - raise ose - - file_name = os.path.join(build_artifact_storage_dir, "cooker_log.txt") - try: - with open(file_name, "w") as f: - f.write(br.environment.get_artifact(br.build.cooker_log_path).read()) - except IOError: - os.unlink(file_name) - - br.state = BuildRequest.REQ_COMPLETED + else: + br.state = BuildRequest.REQ_COMPLETED br.save() def cleanup(self): |