Chromium Code Reviews| Index: third_party/gsutil/gslib/command.py |
| diff --git a/third_party/gsutil/gslib/command.py b/third_party/gsutil/gslib/command.py |
| index 076455baf5a28225128f4d622b9d06a31dec3f7b..91f1818fc63808c36347eb94b901a92f4f450308 100644 |
| --- a/third_party/gsutil/gslib/command.py |
| +++ b/third_party/gsutil/gslib/command.py |
| @@ -169,7 +169,8 @@ class Command(object): |
| def __init__(self, command_runner, args, headers, debug, parallel_operations, |
| gsutil_bin_dir, boto_lib_dir, config_file_list, gsutil_ver, |
| - bucket_storage_uri_class, test_method=None): |
| + bucket_storage_uri_class, test_method=None, |
| + bypass_prodaccess=True): |
|
Vadim Sh.
2013/12/03 01:33:41
nit: add it to Args section in doc string.
Ryan Tseng
2013/12/03 22:57:11
Done.
|
| """ |
| Args: |
| command_runner: CommandRunner (for commands built atop other commands). |
| @@ -209,6 +210,7 @@ class Command(object): |
| self.exclude_symlinks = False |
| self.recursion_requested = False |
| self.all_versions = False |
| + self.bypass_prodaccess = bypass_prodaccess |
| # Process sub-command instance specifications. |
| # First, ensure subclass implementation sets all required keys. |
| @@ -343,9 +345,9 @@ class Command(object): |
| if os.path.isfile(acl_arg): |
| acl_file = open(acl_arg, 'r') |
| acl_arg = acl_file.read() |
| - |
| + |
| # TODO: Remove this workaround when GCS allows |
| - # whitespace in the Permission element on the server-side |
| + # whitespace in the Permission element on the server-side |
| acl_arg = re.sub(r'<Permission>\s*(\S+)\s*</Permission>', |
| r'<Permission>\1</Permission>', acl_arg) |
| @@ -642,7 +644,7 @@ class Command(object): |
| def _ConfigureNoOpAuthIfNeeded(self): |
| """Sets up no-op auth handler if no boto credentials are configured.""" |
| config = boto.config |
| - if not util.HasConfiguredCredentials(): |
| + if not util.HasConfiguredCredentials(self.bypass_prodaccess): |
| if self.config_file_list: |
| if (config.has_option('Credentials', 'gs_oauth2_refresh_token') |
| and not HAVE_OAUTH2): |