Fix Python 3.8 warning when getting Unix time zone

This commit is contained in:
James Anderson 2021-10-25 17:19:39 -04:00
parent fb303e048f
commit f8faed6e47
No known key found for this signature in database
GPG Key ID: 9933AD4AF108B40E
1 changed files with 1 additions and 1 deletions

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)