| Index: appengine/swarming/swarming_bot/bot_code/bot_main.py
|
| diff --git a/appengine/swarming/swarming_bot/bot_code/bot_main.py b/appengine/swarming/swarming_bot/bot_code/bot_main.py
|
| index 2c3539ad3442c57fd02cb80df98c9872157082f5..3e37b25918e7cfbfef8f75e947466694b76dfe97 100644
|
| --- a/appengine/swarming/swarming_bot/bot_code/bot_main.py
|
| +++ b/appengine/swarming/swarming_bot/bot_code/bot_main.py
|
| @@ -140,6 +140,10 @@ def _register_extra_bot_config(content):
|
| This file is called implicitly by _call_hook() and _call_hook_safe().
|
| """
|
| global _EXTRA_BOT_CONFIG
|
| + if isinstance(content, unicode):
|
| + # compile will throw if there's a '# coding: utf-8' line and the string is
|
| + # in unicode. <3 python.
|
| + content = content.encode('utf-8')
|
| try:
|
| compiled = compile(content, 'bot_config.py', 'exec')
|
| _EXTRA_BOT_CONFIG = types.ModuleType('bot_config')
|
|
|