Page MenuHomeDevCentral

D2114.diff
No OneTemporary

D2114.diff

diff --git a/_tests/pillar/paas/test_docker.py b/_tests/pillar/paas/test_docker.py
--- a/_tests/pillar/paas/test_docker.py
+++ b/_tests/pillar/paas/test_docker.py
@@ -9,7 +9,7 @@
def setUp(self):
with open(PILLAR_FILE, 'r') as fd:
- self.pillar = yaml.load(fd)
+ self.pillar = yaml.safe_load(fd)
# nginx needs a host/app_port pair to spawn a configuration
def test_host_is_paired_with_app_port_option(self):
diff --git a/_tests/salt_test_case.py b/_tests/salt_test_case.py
--- a/_tests/salt_test_case.py
+++ b/_tests/salt_test_case.py
@@ -12,7 +12,7 @@
@staticmethod
def import_data_from_yaml(filename):
with open(filename, 'r') as fd:
- return yaml.load(fd.read())
+ return yaml.safe_load(fd.read())
def mock_pillar(self, filename=None, target=None):
if not target:
diff --git a/utils/dump-py-state.py b/utils/dump-py-state.py
--- a/utils/dump-py-state.py
+++ b/utils/dump-py-state.py
@@ -39,7 +39,7 @@
pillar = {}
for pillar_file in get_pillar_files(pillar_directory):
- data = yaml.load(open(pillar_file, "r"))
+ data = yaml.safe_load(open(pillar_file, "r"))
pillar.update(data)
return pillar
diff --git a/utils/generate-webcontent-index.py b/utils/generate-webcontent-index.py
--- a/utils/generate-webcontent-index.py
+++ b/utils/generate-webcontent-index.py
@@ -47,7 +47,7 @@
def get_pillar_entry(pillar_file, key):
with open(pillar_file) as fd:
- pillar = yaml.load(fd.read())
+ pillar = yaml.safe_load(fd.read())
return pillar[key]
diff --git a/utils/migrate-ssh-keys.py b/utils/migrate-ssh-keys.py
--- a/utils/migrate-ssh-keys.py
+++ b/utils/migrate-ssh-keys.py
@@ -69,7 +69,7 @@
def read_state():
fd = open(state_file, "r")
- states = yaml.load(fd.read())
+ states = yaml.safe_load(fd.read())
fd.close()
return states[state_key]
diff --git a/utils/next-uid.py b/utils/next-uid.py
--- a/utils/next-uid.py
+++ b/utils/next-uid.py
@@ -17,7 +17,7 @@
def get_shellusers(filename, key):
with open(filename) as stream:
- data = yaml.load(stream)
+ data = yaml.safe_load(stream)
return data[key]

File Metadata

Mime Type
text/plain
Expires
Fri, Nov 29, 11:37 (21 h, 47 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2271151
Default Alt Text
D2114.diff (2 KB)

Event Timeline