toxic: 0.15.1 -> 0.16.0
[NixPkgs.git] / pkgs / tools / admin / google-cloud-sdk / gsutil-disable-updates.patch
bloba262dcabf74e67a5ecdf803681c5da8c601da101
1 diff --git a/platform/gsutil/gslib/command_runner.py b/platform/gsutil/gslib/command_runner.py
2 index f490bb3..dc6bbcc 100644
3 --- a/platform/gsutil/gslib/command_runner.py
4 +++ b/platform/gsutil/gslib/command_runner.py
5 @@ -330,18 +330,6 @@ class CommandRunner(object):
6 Returns:
7 Return value(s) from Command that was run.
8 """
9 - command_changed_to_update = False
10 - if (not skip_update_check and
11 - self.MaybeCheckForAndOfferSoftwareUpdate(command_name, debug)):
12 - command_name = 'update'
13 - command_changed_to_update = True
14 - args = [_StringToSysArgType('-n')]
16 - # Check for opt-in analytics.
17 - if system_util.IsRunningInteractively() and collect_analytics:
18 - metrics.CheckAndMaybePromptForAnalyticsEnabling()
20 - self.MaybePromptForPythonUpdate(command_name)
22 if not args:
23 args = []
24 @@ -415,15 +403,6 @@ class CommandRunner(object):
25 ShutDownGsutil()
26 if GetFailureCount() > 0:
27 return_code = 1
28 - if command_changed_to_update:
29 - # If the command changed to update, the user's original command was
30 - # not executed.
31 - return_code = 1
32 - print('\n'.join(
33 - textwrap.wrap(
34 - 'Update was successful. Exiting with code 1 as the original command '
35 - 'issued prior to the update was not executed and should be re-run.'
36 - )))
37 return return_code
39 def SkipUpdateCheck(self):
40 @@ -467,6 +446,7 @@ class CommandRunner(object):
41 return True
43 def MaybeCheckForAndOfferSoftwareUpdate(self, command_name, debug):
44 + return False
45 """Checks the last time we checked for an update and offers one if needed.
47 Offer is made if the time since the last update check is longer