Skip to content

Commit

Permalink
Merge remote-tracking branch 'vlab/master' into develop
Browse files Browse the repository at this point in the history
Add support for PyYAML5.1
  • Loading branch information
Jian Kuang committed Aug 6, 2019
2 parents cb3385a + 9f74410 commit 3632dc7
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion crow/config/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def expand_text(text,scope):

def from_string(s,evaluate_immediates=True,validation_stage=None):
if not s: raise TypeError('Cannot parse null string')
c=ConvertFromYAML(yaml.load(s),CONFIG_TOOLS,ENV)
c=ConvertFromYAML(yaml.load(s, Loader=yaml.Loader),CONFIG_TOOLS,ENV)
result=c.convert(validation_stage=validation_stage,
evaluate_immediates=evaluate_immediates)
return result
Expand Down
2 changes: 1 addition & 1 deletion rocoto_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@

import worktools ;
if __name__ == '__main__':
worktools.make_rocoto_xml_for('/Users/jiankuang/Documents/expdir/expdir/test3')
worktools.make_rocoto_xml_for('/export/emc-lw-jkuang/jkuang/expdir/expdir/manual_dev')
4 changes: 2 additions & 2 deletions tests/regression/compare_GFS_comdirs.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def get_args():
if Path(args.cmp_dirs_with_joblevel_file[0]).is_file():
yaml_file_open = open(args.cmp_dirs_with_joblevel_file[0], 'r')
try:
file_dic_list = yaml.load( yaml_file_open )
file_dic_list = yaml.load( yaml_file_open, Loader=yaml.Loader )
using_file_list = True
except yaml.YAMLError as exc:
logger.critical(logger_hdr+'argument %s is not a valid YAML file')
Expand Down Expand Up @@ -485,7 +485,7 @@ def get_logger():
yaml_files_filename_Path = Path(yaml_files_filename)
if yaml_files_filename_Path.is_file():
yaml_files_fptr = open( yaml_files_filename )
file_dic_list = yaml.load( yaml_files_fptr )
file_dic_list = yaml.full_load( yaml_files_fptr )
yaml_files_fptr.close()

if 'prior_ROTDIR' in file_dic_list:
Expand Down

0 comments on commit 3632dc7

Please sign in to comment.