mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 17:33:54 +00:00
Checking install_time for '(none)' value
RedHat systems might in some cases return '(none)' as install_time, which would cause a ValueError. We are checking for '(none)' now. install_date and install_date_time are being set to None in that case.
This commit is contained in:
parent
a4856372ca
commit
7aeed33575
@ -104,7 +104,7 @@ def parse_pkginfo(line, osarch=None):
|
|||||||
if epoch not in ('(none)', '0'):
|
if epoch not in ('(none)', '0'):
|
||||||
version = ':'.join((epoch, version))
|
version = ':'.join((epoch, version))
|
||||||
|
|
||||||
if install_time:
|
if install_time not in ('(none)', '0'):
|
||||||
install_date = datetime.datetime.utcfromtimestamp(int(install_time)).isoformat() + "Z"
|
install_date = datetime.datetime.utcfromtimestamp(int(install_time)).isoformat() + "Z"
|
||||||
install_date_time_t = int(install_time)
|
install_date_time_t = int(install_time)
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user