shin- 11 年之前
父节点
当前提交
1e09652721
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      stackbrew/lib/db.py

+ 1 - 1
stackbrew/lib/db.py

@@ -33,7 +33,7 @@ class SummaryV2(object):
     def handle_build_result(self, exc, repo, version, img_id, build_result):
     def handle_build_result(self, exc, repo, version, img_id, build_result):
         c = self._engine.connect()
         c = self._engine.connect()
         if exc and self.errorlogs:
         if exc and self.errorlogs:
-            with open('{2}/{0}.{1}.error.log'.format(repo.name, version[1], self.errorlogs)) as f:
+            with open('{2}/{0}.{1}.error.log'.format(repo.name, version[1], self.errorlogs), 'w') as f:
                 f.write(build_result)
                 f.write(build_result)
         ins = summary_item.insert().values(
         ins = summary_item.insert().values(
             repo_name=repo.name,
             repo_name=repo.name,