| Index: appengine/swarming/swarming_bot/__main__.py
|
| diff --git a/appengine/swarming/swarming_bot/__main__.py b/appengine/swarming/swarming_bot/__main__.py
|
| index 54a9c8d3a2e4a9ed6a7147fbbbe6fbfcb1f49de3..689b2e4b208c6ea1696998ddb1555e8ae692b598 100644
|
| --- a/appengine/swarming/swarming_bot/__main__.py
|
| +++ b/appengine/swarming/swarming_bot/__main__.py
|
| @@ -35,6 +35,15 @@ sys.path.insert(0, os.path.join(THIS_FILE, 'third_party', 'pyasn1'))
|
| sys.path.insert(0, os.path.join(THIS_FILE, 'third_party', 'pyasn1-modules'))
|
| sys.path.insert(0, os.path.join(THIS_FILE, 'third_party', 'rsa'))
|
|
|
| +# The google library can occasionally get imported prior to the path
|
| +# maipulation above. If this happens, reload the module to pick up the version
|
| +# packaged in the bot_code in third_party.
|
| +path_to_zip = os.path.dirname(os.path.realpath(__file__))
|
| +path_to_google = os.path.join(path_to_zip, 'third_party', 'google')
|
| +import google
|
| +if google.__path__[0] != path_to_google:
|
| + google = reload(google)
|
| +
|
| from bot_code import common
|
|
|
|
|
|
|