jenkins-autojobs icon indicating copy to clipboard operation
jenkins-autojobs copied to clipboard

Fix warning with Python 3.4

Open LouisVN opened this issue 7 years ago • 0 comments

Warning showing up while running with Python 3.4

/usr/local/lib/python3.4/site-packages/jenkins_autojobs/main.py:124: UnsafeLoaderWarning: The default 'Loader' for 'load(stream)' without further arguments can be unsafe. Use 'load(stream, Loader=ruamel.yaml.Loader)' explicitly if that is OK. Alternatively include the following in your code:

import warnings warnings.simplefilter('ignore', ruamel.yaml.error.UnsafeLoaderWarning)

In most other cases you should consider using 'safe_load(stream)' config = yaml.load(opts.yamlconfig)

LouisVN avatar Mar 16 '17 10:03 LouisVN