Skip to content

Commit

Permalink
update for Python3
Browse files Browse the repository at this point in the history
  • Loading branch information
jmckenna committed Dec 13, 2020
1 parent 55bfcf1 commit db4acd5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion msautotest/pymod/mstestlib.py
Expand Up @@ -121,7 +121,11 @@ def read_test_directives( mapfile_name ):
runparms_list = []
require_list = []

lines = open(mapfile_name).readlines()
from sys import version_info
if version_info >= (3,0,0):
lines = open(mapfile_name, encoding="utf8").readlines()
else:
lines = open(mapfile_name).readlines()
for line in lines:
req_off = line.find( 'REQUIRES:' )
if req_off != -1:
Expand Down

0 comments on commit db4acd5

Please sign in to comment.