mirror of
https://github.com/platformio/platformio-core.git
synced 2026-05-04 20:04:13 +02:00
fix datetime validation in package publish command
This commit is contained in:
@@ -23,6 +23,8 @@ from platformio.package.spec import PackageSpec, PackageType
|
||||
|
||||
|
||||
def validate_datetime(ctx, param, value): # pylint: disable=unused-argument
|
||||
if not value:
|
||||
return value
|
||||
try:
|
||||
datetime.strptime(value, "%Y-%m-%d %H:%M:%S")
|
||||
except ValueError as e:
|
||||
|
||||
Reference in New Issue
Block a user