Merge pull request #46293 from eliasp/2017.7-44624-py3-compat

Fix Python3 comparison `TypeError` in `salt.modules.upstart`
This commit is contained in:
Nicole Thomas 2018-03-02 11:36:09 -05:00 committed by GitHub
commit 978e869490
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -97,7 +97,7 @@ def _find_utmp():
result[os.stat(utmp).st_mtime] = utmp
except Exception:
pass
if result > 0:
if len(result):
return result[sorted(result).pop()]
else:
return False