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 @@ -23,7 +23,7 @@ refs/tags/0.9: 36870b185fc5f5486636d4515f0e22677493f225
23
23
refs/tags/0.10: ac33f2b15782272ae348dbd7b14b8257b2148b5a
24
24
refs/tags/0.11.0: e1247cb1d0d681be034adb4b558b5a0c0d5720f9
25
25
refs/tags/0.12.0: f0c419429ef30723ceaf6b42f9b5a2aeb5d2e2d1
26
- refs/heads/beta: d1082aa3a1ec7d039b58eba994e32b79db778381
26
+ refs/heads/beta: 96d7400b1a1e2e8f3ac052015684fc3946e2da19
27
27
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
28
28
refs/heads/tmp: 8c0aa6d64ebab528f7eb182812007155d6044972
29
29
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f
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