2020-02-13 11:14:31 +00:00
|
|
|
diff --git a/platform/gsutil/gslib/command_runner.py b/platform/gsutil/gslib/command_runner.py
|
2021-05-31 21:12:12 +01:00
|
|
|
index f490bb3..dc6bbcc 100644
|
2020-02-13 11:14:31 +00:00
|
|
|
--- a/platform/gsutil/gslib/command_runner.py
|
|
|
|
+++ b/platform/gsutil/gslib/command_runner.py
|
2021-10-18 20:59:37 +01:00
|
|
|
@@ -330,18 +330,6 @@ class CommandRunner(object):
|
2020-02-13 11:14:31 +00:00
|
|
|
Returns:
|
|
|
|
Return value(s) from Command that was run.
|
|
|
|
"""
|
|
|
|
- command_changed_to_update = False
|
|
|
|
- if (not skip_update_check and
|
|
|
|
- self.MaybeCheckForAndOfferSoftwareUpdate(command_name, debug)):
|
|
|
|
- command_name = 'update'
|
|
|
|
- command_changed_to_update = True
|
|
|
|
- args = [_StringToSysArgType('-n')]
|
|
|
|
-
|
|
|
|
- # Check for opt-in analytics.
|
|
|
|
- if system_util.IsRunningInteractively() and collect_analytics:
|
|
|
|
- metrics.CheckAndMaybePromptForAnalyticsEnabling()
|
|
|
|
-
|
2021-10-18 20:59:37 +01:00
|
|
|
- self.MaybePromptForPythonUpdate(command_name)
|
|
|
|
|
2020-02-13 11:14:31 +00:00
|
|
|
if not args:
|
|
|
|
args = []
|
2021-10-18 20:59:37 +01:00
|
|
|
@@ -415,15 +403,6 @@ class CommandRunner(object):
|
2020-02-13 11:14:31 +00:00
|
|
|
ShutDownGsutil()
|
|
|
|
if GetFailureCount() > 0:
|
|
|
|
return_code = 1
|
|
|
|
- if command_changed_to_update:
|
|
|
|
- # If the command changed to update, the user's original command was
|
|
|
|
- # not executed.
|
|
|
|
- return_code = 1
|
|
|
|
- print('\n'.join(
|
|
|
|
- textwrap.wrap(
|
|
|
|
- 'Update was successful. Exiting with code 1 as the original command '
|
|
|
|
- 'issued prior to the update was not executed and should be re-run.'
|
|
|
|
- )))
|
|
|
|
return return_code
|
|
|
|
|
2021-10-18 20:59:37 +01:00
|
|
|
def SkipUpdateCheck(self):
|
|
|
|
@@ -467,6 +446,7 @@ class CommandRunner(object):
|
|
|
|
return True
|
|
|
|
|
2020-02-13 11:14:31 +00:00
|
|
|
def MaybeCheckForAndOfferSoftwareUpdate(self, command_name, debug):
|
|
|
|
+ return False
|
|
|
|
"""Checks the last time we checked for an update and offers one if needed.
|
|
|
|
|
|
|
|
Offer is made if the time since the last update check is longer
|