Skip to content

Commit

Permalink
deserialize the file
Browse files Browse the repository at this point in the history
  • Loading branch information
creatorcary committed Jul 3, 2024
1 parent cdd791f commit 747f34a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/middlewared/middlewared/plugins/system/vendor/vendor.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import json
import os

from middlewared.api import api_method
Expand All @@ -15,7 +16,7 @@ def name(self) -> str | None:
try:
with open(SENTINEL_FILE_PATH, 'r') as file:
if contents := file.read():
return contents
return json.loads(contents).get('name')
except FileNotFoundError:
return None

Expand Down

0 comments on commit 747f34a

Please sign in to comment.