File tree Expand file tree Collapse file tree 2 files changed +6
-10
lines changed Expand file tree Collapse file tree 2 files changed +6
-10
lines changed Original file line number Diff line number Diff line change @@ -29,6 +29,6 @@ refs/heads/tmp: e5d90d98402475b6e154ce216f9efcb80da1a747
29
29
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f
30
30
refs/tags/homu-tmp: 1fe32ca12c51afcd761d9962f51a74ff0d07a591
31
31
refs/tags/1.0.0-beta: 8cbb92b53468ee2b0c2d3eeb8567005953d40828
32
- refs/heads/stable: d1082aa3a1ec7d039b58eba994e32b79db778381
32
+ refs/heads/stable: 96d7400b1a1e2e8f3ac052015684fc3946e2da19
33
33
refs/tags/1.0.0: 55bd4f8ff2b323f317ae89e254ce87162d52a375
34
34
refs/tags/1.1.0: bc3c16f09287e5545c1d3f76b7abd54f2eca868b
Original file line number Diff line number Diff line change 18
18
# since the same version
19
19
# * Prints information about features
20
20
21
- import sys , os , re
21
+ import sys
22
+ import os
23
+ import re
24
+ import codecs
22
25
23
26
if len (sys .argv ) < 2 :
24
27
print ("usage: featureck.py <src-dir>" )
78
81
if not filename .endswith (".rs" ):
79
82
continue
80
83
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
-
88
84
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 :
90
86
line_num = 0
91
87
for line in f :
92
88
line_num += 1
You can’t perform that action at this time.
0 commit comments