Skip to content

Commit

Permalink
Merge pull request #138 from nokia/New_pyyaml_API
Browse files Browse the repository at this point in the history
Change due to new pyyaml API - add Loader for yaml.load method
  • Loading branch information
marcin-usielski authored Mar 20, 2019
2 parents 493ba12 + 85e0910 commit 3a8f307
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion moler/command_scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ def _wait_for_slot_for_command(self, cmd):
while cmd.timeout >= (time.time() - start_time):
time.sleep(0.005)
with lock:
if conn_atr['current_cmd'] is None and cmd == conn_atr['queue'][0]:
if conn_atr['current_cmd'] is None and len(conn_atr['queue']) >= 1 and cmd == conn_atr['queue'][0]:
conn_atr['queue'].pop(0)
conn_atr['current_cmd'] = cmd
cmd._log(logging.DEBUG,
Expand Down
2 changes: 1 addition & 1 deletion moler/config/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def read_yaml_configfile(path):
"""
if os.path.isabs(path):
with read_configfile(path) as content:
return yaml.load(content)
return yaml.load(content, Loader=yaml.FullLoader)
else:
error = "Loading configuration requires absolute path and not '{}'".format(path)
raise MolerException(error)
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
futures >= 3.0.0; python_version == "2.7"
ptyprocess
pyyaml
pyyaml >= 5.1
six
transitions
apscheduler
Expand Down

0 comments on commit 3a8f307

Please sign in to comment.