@@ -149,8 +149,8 @@ def create_release_branch(remote, src_branch, release):
149
149
def process_file (file_path , line_callback ):
150
150
fh , abs_path = tempfile .mkstemp ()
151
151
modified = False
152
- with open (abs_path ,'w' ) as new_file :
153
- with open (file_path ) as old_file :
152
+ with open (abs_path ,'w' , encoding = 'utf-8' ) as new_file :
153
+ with open (file_path , encoding = 'utf-8' ) as old_file :
154
154
for line in old_file :
155
155
new_line = line_callback (line )
156
156
modified = modified or (new_line != line )
@@ -266,7 +266,7 @@ def wait_for_node_startup(host='127.0.0.1', port=9200,timeout=15):
266
266
# Returns the next version string ie. 0.90.7
267
267
def find_release_version (src_branch ):
268
268
run ('git checkout %s' % src_branch )
269
- with open ('pom.xml' ) as file :
269
+ with open ('pom.xml' , encoding = 'utf-8' ) as file :
270
270
for line in file :
271
271
match = re .search (r'<version>(.+)-SNAPSHOT</version>' , line )
272
272
if match :
@@ -397,7 +397,7 @@ def publish_artifacts(artifacts, base='elasticsearch/elasticsearch', dry_run=Tru
397
397
def print_sonartype_notice ():
398
398
settings = os .path .join (os .path .expanduser ('~' ), '.m2/settings.xml' )
399
399
if os .path .isfile (settings ):
400
- with open (settings ) as settings_file :
400
+ with open (settings , encoding = 'utf-8' ) as settings_file :
401
401
for line in settings_file :
402
402
if line .strip () == '<id>sonatype-nexus-snapshots</id>' :
403
403
# moving out - we found the indicator no need to print the warning
@@ -530,4 +530,4 @@ def check_s3_credentials():
530
530
# we delete this one anyways
531
531
run ('git branch -D %s' % (release_branch (release_version )))
532
532
if smoke_test_version :
533
- download_and_verify (smoke_test_version , artifact_names (smoke_test_version ))
533
+ download_and_verify (smoke_test_version , artifact_names (smoke_test_version ))
0 commit comments