Commit e144bb1b0541530b87de4c6b12c986b734de33f7

Authored by Antoine Goutenoir
1 parent 860927a2
Exists in master

Fix encoding.

Showing 1 changed file with 3 additions and 3 deletions   Show diff stats
flaskr/controllers/main_controller.py
@@ -282,7 +282,7 @@ def compute(): # process the queue of estimation requests @@ -282,7 +282,7 @@ def compute(): # process the queue of estimation requests
282 origins = [] 282 origins = []
283 283
284 if origins_addresses_count > maximum_addresses_to_compute: 284 if origins_addresses_count > maximum_addresses_to_compute:
285 - errmsg = "Too many origins. (%d > %d) Please contact us for support of that many origins." % (origins_addresses_count, maximum_addresses_to_compute) 285 + errmsg = u"Too many origins. (%d > %d) Please contact us for support of that many origins." % (origins_addresses_count, maximum_addresses_to_compute)
286 _handle_failure(estimation, errmsg) 286 _handle_failure(estimation, errmsg)
287 return _respond(errmsg) 287 return _respond(errmsg)
288 288
@@ -324,7 +324,7 @@ def compute(): # process the queue of estimation requests @@ -324,7 +324,7 @@ def compute(): # process the queue of estimation requests
324 destinations = [] 324 destinations = []
325 325
326 if destinations_addresses_count > maximum_addresses_to_compute: 326 if destinations_addresses_count > maximum_addresses_to_compute:
327 - errmsg = "Too many destinations. (%d > %d) Please contact us for support of that many destinations." % (destinations_addresses_count, maximum_addresses_to_compute) 327 + errmsg = u"Too many destinations. (%d > %d) Please contact us for support of that many destinations." % (destinations_addresses_count, maximum_addresses_to_compute)
328 _handle_failure(estimation, errmsg) 328 _handle_failure(estimation, errmsg)
329 return _respond(errmsg) 329 return _respond(errmsg)
330 330
@@ -569,7 +569,7 @@ def compute(): # process the queue of estimation requests @@ -569,7 +569,7 @@ def compute(): # process the queue of estimation requests
569 return _respond(response) 569 return _respond(response)
570 570
571 except Exception as e: 571 except Exception as e:
572 - errmsg = "Computation failed : %s" % (e,) 572 + errmsg = u"Computation failed : %s" % (e,)
573 if estimation: 573 if estimation:
574 _handle_failure(estimation, errmsg) 574 _handle_failure(estimation, errmsg)
575 return _respond(errmsg) 575 return _respond(errmsg)