File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ def run_labels(self, args):
46
46
self .parse_args (args , "Label Modifier" )
47
47
if not os .path .exists (args .labels ):
48
48
raise RuntimeError ("Labels file '{}' does not exist" .format (args .labels ))
49
- with open (args .labels , "rb " ) as input_file :
49
+ with open (args .labels , "r" , encoding = "utf-8 " ) as input_file :
50
50
# Read the contents of the file
51
51
lines = input_file .readlines ()
52
52
if args .dry_run :
@@ -55,8 +55,8 @@ def run_labels(self, args):
55
55
modified_lines = modify_lines (self , args , lines )
56
56
self .logger .debug (modified_lines )
57
57
if not args .dry_run :
58
- with open (args .labels , "wb " ) as output_file :
58
+ with open (args .labels , "w" , encoding = "utf-8 " ) as output_file :
59
59
# Iterate through each line
60
60
for line in modified_lines :
61
61
# Write the modified line to the output file
62
- output_file .write (line . encode ( "utf-8" ) )
62
+ output_file .write (line )
You can’t perform that action at this time.
0 commit comments