diff --git a/platformio/package/manifest/parser.py b/platformio/package/manifest/parser.py index d49d7b9c..66dee43c 100644 --- a/platformio/package/manifest/parser.py +++ b/platformio/package/manifest/parser.py @@ -185,6 +185,8 @@ class BaseManifestParser(object): assert isinstance(author, dict) if author.get("email"): author["email"] = re.sub(r"\s+[aA][tT]\s+", "@", author["email"]) + if "@" not in author["email"]: + author["email"] = None for key in list(author.keys()): if author[key] is None: del author[key] diff --git a/tests/package/test_manifest.py b/tests/package/test_manifest.py index 53a31e9b..fe5054d0 100644 --- a/tests/package/test_manifest.py +++ b/tests/package/test_manifest.py @@ -279,7 +279,7 @@ ignore_empty_field= # Author + Maintainer data = parser.LibraryPropertiesManifestParser( """ -author=Rocket Scream Electronics +author=Rocket Scream Electronics maintainer=Rocket Scream Electronics """ ).as_dict()