Merge pull request #43214 from brejoc/fix_for_install_time_rh

Checking install_time for None value
This commit is contained in:
Mike Place 2017-08-28 11:14:37 -06:00 committed by GitHub
commit d685cfe4b3

View File

@ -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)