Skip to content

Commit a3ff87a

Browse files
committed
---
yaml --- r: 211367 b: refs/heads/tmp c: 96d7400 h: refs/heads/master i: 211365: f71887e 211363: d4eb73e 211359: ba850a9 v: v3
1 parent cf8e910 commit a3ff87a

File tree

2 files changed

+6
-10
lines changed

2 files changed

+6
-10
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: 2d00dc3b85aaf81caa3a4e5764c5e185a4dd0a7c
3333
refs/heads/windistfix: 7608dbad651f02e837ed05eef3d74a6662a6e928
3434
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
35-
refs/heads/tmp: d1082aa3a1ec7d039b58eba994e32b79db778381
35+
refs/heads/tmp: 96d7400b1a1e2e8f3ac052015684fc3946e2da19
3636
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f
3737
refs/tags/homu-tmp: 704c2ee730d2e948d11a2edd77e3f35de8329a6e
3838
refs/heads/gate: 97c84447b65164731087ea82685580cc81424412

branches/tmp/src/etc/featureck.py

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,10 @@
1818
# since the same version
1919
# * Prints information about features
2020

21-
import sys, os, re
21+
import sys
22+
import os
23+
import re
24+
import codecs
2225

2326
if len(sys.argv) < 2:
2427
print("usage: featureck.py <src-dir>")
@@ -78,15 +81,8 @@
7881
if not filename.endswith(".rs"):
7982
continue
8083

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-
8884
path = os.path.join(dirpath, filename)
89-
with _open(path) as f:
85+
with codecs.open(filename=path, mode='r', encoding="utf-8") as f:
9086
line_num = 0
9187
for line in f:
9288
line_num += 1

0 commit comments

Comments
 (0)