Skip to content

Commit

Permalink
Merge pull request #1332 from m-tmatma/feature/not-to-use-some-handy-…
Browse files Browse the repository at this point in the history
…colors

parse-buildlog.py でエラーの修正のために colors.YELLOW および colors.BLUE を使わない
  • Loading branch information
m-tmatma authored Jul 4, 2020
2 parents 74a0675 + 5540d26 commit 6714575
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions parse-buildlog.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@
'lineNumber',
]

colors_YELLOW = "FFFF00"
colors_BLUE = "0000FF"

# infile: msbuild のビルドログ・ファイル名
# 戻り値: ログの解析結果が入ったハッシュの配列
def parse_buildlog(infile):
Expand Down Expand Up @@ -173,7 +176,7 @@ def converterPython2(value):
for x, item in enumerate(excelKeys):
cell = ws.cell(row=y+1, column=x+1)
cell.value = item
cell.fill = PatternFill(patternType='solid', start_color=colors.YELLOW, end_color=colors.YELLOW)
cell.fill = PatternFill(patternType='solid', start_color=colors_YELLOW, end_color=colors_YELLOW)
maxWidths.append(len(cell.value) + 1)
y = y + 1

Expand Down Expand Up @@ -211,7 +214,7 @@ def converterPython2(value):
if key == "relpath":
val = entry['relpath'] + " line: " + entry['lineNumber']
cell.hyperlink = entry['blobURL']
cell.font = Font(u='single', color=colors.BLUE)
cell.font = Font(u='single', color=colors_BLUE)
else:
entryKey = entry[key]
val = converter(entry[key])
Expand Down Expand Up @@ -284,7 +287,7 @@ def converterPython2(value):
for x, key in enumerate(outputKeys):
cell = wsError.cell(row=y+1, column=x+1)
cell.value = key
cell.fill = PatternFill(patternType='solid', start_color=colors.YELLOW, end_color=colors.YELLOW)
cell.fill = PatternFill(patternType='solid', start_color=colors_YELLOW, end_color=colors_YELLOW)
maxWidths.append(len(cell.value) + 1)
y = y + 1

Expand All @@ -294,7 +297,7 @@ def converterPython2(value):
cell = wsError.cell(row=y+1, column=x+1)
if key == "blobURL":
cell.hyperlink = entry[key]
cell.font = Font(u='single', color=colors.BLUE)
cell.font = Font(u='single', color=colors_BLUE)
val = converter(entry[key])
if val.isdigit():
cell.value = int(val)
Expand Down

0 comments on commit 6714575

Please sign in to comment.