Chromium Code Reviews| Index: remoting/tools/me2me_virtual_host.py |
| diff --git a/remoting/tools/me2me_virtual_host.py b/remoting/tools/me2me_virtual_host.py |
| index 69994d0be6f1c4bff823a408954840abab13f14a..d7432b12626fa512d4d8fbde66f4d3e893f4a55b 100755 |
| --- a/remoting/tools/me2me_virtual_host.py |
| +++ b/remoting/tools/me2me_virtual_host.py |
| @@ -731,15 +731,24 @@ def main(): |
| logging.info("Host process terminated") |
| desktop.host_proc = None |
| - # The exit-code must match the one used in HeartbeatSender. |
| - if os.WEXITSTATUS(status) == 100: |
| + # These exit-codes must match the one used by the host. |
|
Lambros
2012/04/17 19:01:19
s/one/ones
or
s/the one/those
alexeypa (please no reviews)
2012/04/17 19:20:32
Done.
|
| + # See remoting/host/constants.h. |
| + if os.WEXITSTATUS(status) == 1: |
|
Lambros
2012/04/17 19:01:19
Please don't use exit code number 1. The problem
alexeypa (please no reviews)
2012/04/17 19:20:32
Done.
|
| + logging.info("Host configuration is invalid - exiting.") |
| + elif os.WEXITSTATUS(status) == 2: |
| logging.info("Host ID has been deleted - exiting.") |
| - # Host config is no longer valid. Delete it, so the next time this |
| - # script is run, a new Host ID will be created and registered. |
| + elif os.WEXITSTATUS(status) == 3: |
| + logging.info("OAuth credentials are invalid - exiting.") |
| + |
| + # The host config is no longer valid if either of these codes is returned. |
| + # Delete it, so the next time this script is run, a new configuration |
| + # will be created and registered. |
| + if os.WEXITSTATUS(status) == 1 or |
| + os.WEXITSTATUS(status) == 2 or |
| + os.WEXITSTATUS(status) == 3: |
|
Lambros
2012/04/17 19:01:19
In case 3, should remove auth.config_file rather t
alexeypa (please no reviews)
2012/04/17 19:20:32
Done.
|
| os.remove(host.config_file) |
| return 0 |
| - |
| if __name__ == "__main__": |
| logging.basicConfig(level=logging.DEBUG) |
| sys.exit(main()) |