mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 09:23:56 +00:00
Merge pull request #43214 from brejoc/fix_for_install_time_rh
Checking install_time for None value
This commit is contained in:
commit
d685cfe4b3
@ -104,8 +104,12 @@ def parse_pkginfo(line, osarch=None):
|
||||
if epoch not in ('(none)', '0'):
|
||||
version = ':'.join((epoch, version))
|
||||
|
||||
install_date = datetime.datetime.utcfromtimestamp(int(install_time)).isoformat() + "Z"
|
||||
install_date_time_t = int(install_time)
|
||||
if install_time:
|
||||
install_date = datetime.datetime.utcfromtimestamp(int(install_time)).isoformat() + "Z"
|
||||
install_date_time_t = int(install_time)
|
||||
else:
|
||||
install_date = None
|
||||
install_date_time_t = None
|
||||
|
||||
return pkginfo(name, version, arch, repoid, install_date, install_date_time_t)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user