Skip to content

Commit f01e841

Browse files
f
1 parent 02818df commit f01e841

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

pandas/tests/test_util.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,8 @@ def test_locale(self):
8383
#GH9744
8484
locales = pandas.util.testing.get_locales()
8585
raw_locales = pandas.util.testing._default_locale_getter()
86-
warnings.warn(raw_locales, SyntaxWarning)
87-
warnings.warn(locales, SyntaxWarning)
88-
86+
print (raw_locales)
87+
print (locales)
8988
self.assertTrue(len(locales) >= 1)
9089

9190
def test_rands():

pandas/util/testing.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -334,10 +334,11 @@ def get_locales(prefix=None, normalize=True,
334334
raw_locales = raw_locales.split(b'\n')
335335
out_locales = []
336336
for x in raw_locales:
337-
try:
337+
if compat.PY3:
338338
out_locales.append(str(x, encoding=pd.options.display.encoding))
339-
except:
340-
pass
339+
else:
340+
out_locales.append(str(x))
341+
341342
except TypeError:
342343
pass
343344

0 commit comments

Comments
 (0)