Chromium Code Reviews| Index: chrome/test/mini_installer/uninstall_chrome.py |
| diff --git a/chrome/test/mini_installer/uninstall_chrome.py b/chrome/test/mini_installer/uninstall_chrome.py |
| index f501856737d1b6eee8869193cbe9d83e7013d2c4..c2c0e8f4da06e91eaca96ab3f9de2c1f3b663213 100644 |
| --- a/chrome/test/mini_installer/uninstall_chrome.py |
| +++ b/chrome/test/mini_installer/uninstall_chrome.py |
| @@ -20,6 +20,9 @@ def main(): |
| default=False, help='Uninstall Chrome at system level.') |
| parser.add_option('--chrome-long-name', default='Google Chrome', |
| help='Google Chrome or Chromium)') |
| + parser.add_option('--silent', action='store_true', dest='silent', |
|
gab
2013/09/13 15:06:19
How about: --no-error-if-absent or something more
sukolsak
2013/09/13 15:59:33
Will do.
gab
2013/09/13 20:12:55
I meant in this CL...
sukolsak
2013/09/13 23:11:14
Done. Yes, I was waiting for your reply.
gab
2013/09/16 13:59:58
Ah ok, my bad :)!
|
| + default=False, help='Silently return if the registry key ' |
| + 'for uninstalling Chrome is not found') |
| options, _ = parser.parse_args() |
| # TODO(sukolsak): Add support for uninstalling MSI-based Chrome installs when |
| @@ -34,6 +37,8 @@ def main(): |
| try: |
| key = _winreg.OpenKey(root_key, sub_key, 0, _winreg.KEY_QUERY_VALUE) |
| except WindowsError: |
| + if options.silent: |
| + return 1 |
|
gab
2013/09/13 15:06:19
I'd say we should return 0 here.
sukolsak
2013/09/13 15:59:33
Will do.
gab
2013/09/13 20:12:55
I meant in this CL...
sukolsak
2013/09/13 23:11:14
Done.
|
| raise KeyError('Registry key %s\\%s is missing' % ( |
| 'HKEY_LOCAL_MACHINE' if options.system_level else 'HKEY_CURRENT_USER', |
| sub_key)) |