Skip to content

Commit 1401657

Browse files
committed
---
yaml --- r: 211967 b: refs/heads/tmp c: d1082aa h: refs/heads/master i: 211965: 1e003ee 211963: 3427c79 211959: 86e8cac 211951: 32e2cfe 211935: 0fc8f4d 211903: bebe4a5 211839: bb1818f 211711: 0d2bf2e 211455: b7b5330 210943: f948034 v: v3
1 parent 38f64fd commit 1401657

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ refs/heads/building: 126db549b038c84269a1e4fe46f051b2c15d6970
3232
refs/heads/beta: 62e70d35be3fe532c26a400b499c58a18f18dd3a
3333
refs/heads/windistfix: 7608dbad651f02e837ed05eef3d74a6662a6e928
3434
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
35-
refs/heads/tmp: 4decc408dc1dcac5b79edd41760cb85d3dde5a01
35+
refs/heads/tmp: d1082aa3a1ec7d039b58eba994e32b79db778381
3636
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f
3737
refs/tags/homu-tmp: b77d60adb019bb5de05e884a99f3290ec4694137
3838
refs/heads/gate: 97c84447b65164731087ea82685580cc81424412

branches/tmp/src/etc/featureck.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,15 @@
7878
if not filename.endswith(".rs"):
7979
continue
8080

81+
if sys.version_info.major == 2:
82+
_open = lambda f: open(f, 'r')
83+
elif sys.version_info.major == 3:
84+
_open = lambda f: open(f, 'r', encoding="utf-8")
85+
else:
86+
raise RuntimeError("Unsupported python version: %s" % (repr(sys.version_info)))
87+
8188
path = os.path.join(dirpath, filename)
82-
with open(path, 'r') as f:
89+
with _open(path) as f:
8390
line_num = 0
8491
for line in f:
8592
line_num += 1

0 commit comments

Comments
 (0)