mirror of
https://github.com/platformio/platformio-core.git
synced 2025-08-02 11:24:27 +02:00
Improve initiating manifest parser from a package archive
This commit is contained in:
@@ -119,9 +119,10 @@ class ManifestParserFactory(object):
|
|||||||
assert path.endswith("tar.gz")
|
assert path.endswith("tar.gz")
|
||||||
with tarfile.open(path, mode="r:gz") as tf:
|
with tarfile.open(path, mode="r:gz") as tf:
|
||||||
for t in sorted(ManifestFileType.items().values()):
|
for t in sorted(ManifestFileType.items().values()):
|
||||||
|
for member in (t, "./" + t):
|
||||||
try:
|
try:
|
||||||
return ManifestParserFactory.new(
|
return ManifestParserFactory.new(
|
||||||
tf.extractfile(t).read().decode(), t
|
tf.extractfile(member).read().decode(), t
|
||||||
)
|
)
|
||||||
except KeyError:
|
except KeyError:
|
||||||
pass
|
pass
|
||||||
|
Reference in New Issue
Block a user