Skip to content

Commit ed03b60

Browse files
committed
Merge remote-tracking branch 'origin/master' into edge
2 parents 043cd9a + 3d93daf commit ed03b60

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

mig/shared/install.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,15 @@ def determine_timezone(_environ=os.environ, _path_exists=os.path.exists, _print=
112112
return localtime_timezone
113113
except IndexError:
114114
pass
115+
except ValueError:
116+
# The attempt to reassemble a timezone string based on searching
117+
# split path data is brittle and can fail if the locale information
118+
# happen to be located elsewhere on disk - as is the case on e.g.
119+
# FreeBSD.
120+
# Rather than fail hard we catch the exception such that fallback
121+
# logic below can still run and thus failing to decode the timezone
122+
# does not prevent the installation routine running to completion.
123+
pass
115124

116125
_print("WARNING: ignoring non-standard /etc/localtime")
117126

0 commit comments

Comments
 (0)