Skip to content

Commit 3d93daf

Browse files
committed
Manually merge PR153 to support e.g. certain non-linux platforms with locale
info located in other paths and therefore failing our path probing but perhaps still able to detect it by other means. Credits to Alex Burke (albu-diku) for the investigation and patch. I just did some minor polish on the comment text from in the PR. git-svn-id: svn+ssh://svn.code.sf.net/p/migrid/code/trunk@6198 b75ad72c-e7d7-11dd-a971-7dbc132099af
1 parent 8eb397e commit 3d93daf

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)