Make sure Blender's build date is always in expected format
This commit is contained in:
@@ -5,10 +5,12 @@ import platform
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
from datetime import datetime
|
||||
|
||||
# Usually comes from third_party
|
||||
from .third_party import cpuinfo
|
||||
from .third_party import cpu_cores
|
||||
|
||||
from .third_party.dateutil import parser
|
||||
|
||||
def _getBlenderDeviceInfo(ctx):
|
||||
PREFIX = "Benchmark Devices: "
|
||||
@@ -56,6 +58,9 @@ def getBlenderVersion(ctx):
|
||||
tokens[0] = tokens[0].replace(" ", "_")
|
||||
if tokens[0] in INFO:
|
||||
info[tokens[0]] = tokens[1].strip()
|
||||
# Ensure date format keeps Sybren verifier happy.
|
||||
build_date = parser.parse(info["build_date"])
|
||||
info["build_date"] = datetime.strftime(build_date, "%Y-%m-%d")
|
||||
return info
|
||||
|
||||
|
||||
@@ -97,6 +102,9 @@ def gatherSystemInfo(ctx):
|
||||
system_info['dist_name'] = distro[0]
|
||||
system_info['dist_version'] = distro[1]
|
||||
# system_info['libc_version'] = "-".join(platform.libc_ver())
|
||||
else:
|
||||
system_info['dist_name'] = "NA"
|
||||
system_info['dist_version'] = "NA"
|
||||
# TODO(sergey): Make this to work on Windows and macOS
|
||||
cpu_info = cpuinfo.get_cpu_info()
|
||||
cpu_topology = _getCPUTopologyInformation()
|
||||
|
Reference in New Issue
Block a user