mirror of
https://github.com/platformio/platformio-core.git
synced 2025-07-29 17:47:14 +02:00
Fix direct access to non-existing ContentCache data
This commit is contained in:
@ -207,7 +207,7 @@ class ContentCache(object):
|
||||
return None
|
||||
with open(cache_path, "rb") as fp:
|
||||
data = fp.read()
|
||||
if data[0] in ("{", "["):
|
||||
if data and data[0] in ("{", "["):
|
||||
return json.loads(data)
|
||||
return data
|
||||
|
||||
|
Reference in New Issue
Block a user