Skip to content

Commit

Permalink
Merge pull request #57 from kytos-ng/fix/issue_56
Browse files Browse the repository at this point in the history
[Release][Fix] Shallow copy on maintenance
  • Loading branch information
viniarck authored Aug 15, 2022
2 parents ee0392e + e16f54c commit 44a1647
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,14 @@ Security
Changed
=======

[2022.2.1] - 2022-08-15
***********************

Fixed
=====
- Made a shallow copy when iterating on shared data structure to avoid RuntimeError size changed


[2022.2.0] - 2022-08-08
***********************

Expand Down
2 changes: 1 addition & 1 deletion kytos.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"username": "kytos",
"name": "maintenance",
"description": "This NApp creates maintenance windows, allowing the maintenance of network devices (switch, link, and interface) without receiving alerts.",
"version": "2022.2.0",
"version": "2022.2.1",
"napp_dependencies": [],
"license": "MIT",
"tags": [],
Expand Down
2 changes: 1 addition & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def get_mw(self, mw_id=None):
if mw_id is None:
return jsonify(
[maintenance.as_dict()
for maintenance in self.maintenances.values()]), 200
for maintenance in self.maintenances.copy().values()]), 200
try:
return jsonify(self.maintenances[mw_id].as_dict()), 200
except KeyError:
Expand Down

0 comments on commit 44a1647

Please sign in to comment.