Skip to content

Commit

Permalink
Use yaml.safe_load to fix microsoft#136
Browse files Browse the repository at this point in the history
  • Loading branch information
derekbekoe committed Feb 11, 2019
1 parent 07ce4c3 commit 0143814
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion knack/help.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ class HelpFile(HelpObject):
def _load_help_file_from_string(text):
import yaml
try:
return yaml.load(text) if text else None
return yaml.safe_load(text) if text else None
except Exception: # pylint: disable=broad-except
return text

Expand Down
2 changes: 1 addition & 1 deletion knack/help_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@
def _load_help_file(delimiters):
import yaml
if delimiters in helps:
return yaml.load(helps[delimiters])
return yaml.safe_load(helps[delimiters])
return None
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from codecs import open
from setuptools import setup, find_packages

VERSION = '0.5.1'
VERSION = '0.5.2'

DEPENDENCIES = [
'argcomplete',
Expand Down

0 comments on commit 0143814

Please sign in to comment.