Merge pull request #106 from jamesa/master

Fix Python 3.8 warning when getting Unix time zone
This commit is contained in:
Alan Hamlett 2021-10-25 21:32:02 -07:00 committed by GitHub
commit cebcfaa0e9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -97,7 +97,7 @@ def _get_localzone(_root='/'):
if os.path.exists(tzpath) and os.path.islink(tzpath):
tzpath = os.path.realpath(tzpath)
start = tzpath.find("/")+1
while start is not 0:
while start != 0:
tzpath = tzpath[start:]
try:
return pytz.timezone(tzpath)