@@ -172,23 +172,23 @@ PyLocale_setlocale(PyObject* self, PyObject* args)
172172#endif
173173
174174 if (locale ) {
175- /* set locale */
176- result = setlocale (category , locale );
177- if (!result ) {
178- /* operation failed, no setting was changed */
179- PyErr_SetString (Error , "unsupported locale setting" );
180- return NULL ;
181- }
182- result_object = PyString_FromString (result );
183- if (!result_object )
184- return NULL ;
185- /* record changes to LC_CTYPE */
186- if (category == LC_CTYPE || category == LC_ALL )
187- fixup_ulcase ();
175+ /* set locale */
176+ result = setlocale (category , locale );
177+ if (!result ) {
178+ /* operation failed, no setting was changed */
179+ PyErr_SetString (Error , "unsupported locale setting" );
180+ return NULL ;
181+ }
182+ result_object = PyString_FromString (result );
183+ if (!result_object )
184+ return NULL ;
185+ /* record changes to LC_CTYPE */
186+ if (category == LC_CTYPE || category == LC_ALL )
187+ fixup_ulcase ();
188188 /* things that got wrong up to here are ignored */
189189 PyErr_Clear ();
190190 } else {
191- /* get locale */
191+ /* get locale */
192192 result = setlocale (category , NULL );
193193 if (!result ) {
194194 PyErr_SetString (Error , "locale query failed" );
@@ -297,9 +297,9 @@ PyLocale_strcoll(PyObject* self, PyObject* args)
297297 }
298298 /* Convert the non-unicode argument to unicode. */
299299 if (!PyUnicode_Check (os1 )) {
300- os1 = PyUnicode_FromObject (os1 );
301- if (!os1 )
302- return NULL ;
300+ os1 = PyUnicode_FromObject (os1 );
301+ if (!os1 )
302+ return NULL ;
303303 rel1 = 1 ;
304304 }
305305 if (!PyUnicode_Check (os2 )) {
0 commit comments