Skip to content

Commit 78afd62

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 8bbe61a commit 78afd62

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
@@ -116,6 +116,15 @@ def determine_timezone(_environ=os.environ, _path_exists=os.path.exists, _print=
116116
return localtime_timezone
117117
except IndexError:
118118
pass
119+
except ValueError:
120+
# The attempt to reassemble a timezone string based on searching
121+
# split path data is brittle and can fail if the locale information
122+
# happen to be located elsewhere on disk - as is the case on e.g.
123+
# FreeBSD.
124+
# Rather than fail hard we catch the exception such that fallback
125+
# logic below can still run and thus failing to decode the timezone
126+
# does not prevent the installation routine running to completion.
127+
pass
119128

120129
_print("WARNING: ignoring non-standard /etc/localtime")
121130

0 commit comments

Comments
 (0)