Skip to content

Commit

Permalink
Set paramserver snapshot flag when snapshot file not exist.
Browse files Browse the repository at this point in the history
  • Loading branch information
hillbrook authored and fengqikai1414 committed Feb 6, 2018
1 parent 0fc7e69 commit e036817
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ros/ros_comm/rosmaster/src/rosmaster/paramserver.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,11 @@ def __init__(self, reg_manager):

if "ROS_MASTER_SNAPSHOT" in os.environ:
try:
self.snapshot = True
self.snapshot_file = os.path.join(os.environ["ROS_ROOT"], ".master_snapshot")
with open(self.snapshot_file, "r") as f:
self.parameters = json.loads(f.read())
del self.parameters["run_id"]
self.snapshot = True
except IOError:
pass
except KeyError:
Expand Down

0 comments on commit e036817

Please sign in to comment.