Skip to content
Snippets Groups Projects
Commit 0c589a07 authored by Neda Moeini's avatar Neda Moeini
Browse files

Fixed type hinting in get_netdash_equipment function to support older Python versions

parent 7f1acfe9
Branches
Tags
No related merge requests found
...@@ -74,6 +74,7 @@ import json ...@@ -74,6 +74,7 @@ import json
import logging import logging
import re import re
from functools import partial from functools import partial
from typing import Dict
from flask import Blueprint, Response, current_app, request, jsonify from flask import Blueprint, Response, current_app, request, jsonify
...@@ -914,7 +915,7 @@ def interfaces(hostname=None): ...@@ -914,7 +915,7 @@ def interfaces(hostname=None):
return Response(result, mimetype="application/json") return Response(result, mimetype="application/json")
def get_netdash_equipment() -> dict[str, str]: def get_netdash_equipment() -> Dict[str, str]:
"""Get the netdash equipment mapping from redis.""" """Get the netdash equipment mapping from redis."""
current_redis = common.get_current_redis() current_redis = common.get_current_redis()
return json.loads(current_redis.get('netdash').decode('utf-8')) return json.loads(current_redis.get('netdash').decode('utf-8'))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment