diff options
Diffstat (limited to 'bitbake/lib/toaster/toastermain/settings.py')
-rw-r--r-- | bitbake/lib/toaster/toastermain/settings.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/bitbake/lib/toaster/toastermain/settings.py b/bitbake/lib/toaster/toastermain/settings.py index 78702fa59e..ce232e0865 100644 --- a/bitbake/lib/toaster/toastermain/settings.py +++ b/bitbake/lib/toaster/toastermain/settings.py | |||
@@ -134,17 +134,16 @@ else: | |||
134 | try: | 134 | try: |
135 | import pytz | 135 | import pytz |
136 | from pytz.exceptions import UnknownTimeZoneError | 136 | from pytz.exceptions import UnknownTimeZoneError |
137 | pass | ||
138 | try: | 137 | try: |
139 | if pytz.timezone(zonename) is not None: | 138 | if pytz.timezone(zonename) is not None: |
140 | zonefilelist[hashlib.md5(open(filepath).read()).hexdigest()] = zonename | 139 | zonefilelist[hashlib.md5(open(filepath, 'rb').read()).hexdigest()] = zonename |
141 | except UnknownTimeZoneError as ValueError: | 140 | except UnknownTimeZoneError as ValueError: |
142 | # we expect timezone failures here, just move over | 141 | # we expect timezone failures here, just move over |
143 | pass | 142 | pass |
144 | except ImportError: | 143 | except ImportError: |
145 | zonefilelist[hashlib.md5(open(filepath).read()).hexdigest()] = zonename | 144 | zonefilelist[hashlib.md5(open(filepath, 'rb').read()).hexdigest()] = zonename |
146 | 145 | ||
147 | TIME_ZONE = zonefilelist[hashlib.md5(open('/etc/localtime').read()).hexdigest()] | 146 | TIME_ZONE = zonefilelist[hashlib.md5(open('/etc/localtime', 'rb').read()).hexdigest()] |
148 | 147 | ||
149 | # Language code for this installation. All choices can be found here: | 148 | # Language code for this installation. All choices can be found here: |
150 | # http://www.i18nguy.com/unicode/language-identifiers.html | 149 | # http://www.i18nguy.com/unicode/language-identifiers.html |