OXIESEC PANEL
- Current Dir:
/
/
opt
/
gsutil
/
gslib
/
utils
/
__pycache__
Server IP: 2a02:4780:11:1594:0:ef5:22d7:a
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
02/11/2025 08:19:48 AM
rwxr-xr-x
📄
__init__.cpython-39.pyc
126 bytes
02/11/2025 08:19:48 AM
rw-r--r--
📄
acl_helper.cpython-39.pyc
9.38 KB
02/11/2025 08:19:49 AM
rw-r--r--
📄
arg_helper.cpython-39.pyc
1.01 KB
02/11/2025 08:19:48 AM
rw-r--r--
📄
boto_util.cpython-39.pyc
16.46 KB
02/11/2025 08:19:48 AM
rw-r--r--
📄
cat_helper.cpython-39.pyc
4.21 KB
02/11/2025 08:19:49 AM
rw-r--r--
📄
cloud_api_helper.cpython-39.pyc
3.29 KB
02/11/2025 08:19:48 AM
rw-r--r--
📄
constants.cpython-39.pyc
2.88 KB
02/11/2025 08:19:48 AM
rw-r--r--
📄
copy_helper.cpython-39.pyc
101.64 KB
02/11/2025 08:19:49 AM
rw-r--r--
📄
encryption_helper.cpython-39.pyc
5.84 KB
02/11/2025 08:19:49 AM
rw-r--r--
📄
execution_util.cpython-39.pyc
1.06 KB
02/11/2025 08:19:48 AM
rw-r--r--
📄
hashing_helper.cpython-39.pyc
15.71 KB
02/11/2025 08:19:48 AM
rw-r--r--
📄
iam_helper.cpython-39.pyc
8.61 KB
02/11/2025 08:19:49 AM
rw-r--r--
📄
ls_helper.cpython-39.pyc
12.4 KB
02/11/2025 08:19:49 AM
rw-r--r--
📄
metadata_util.cpython-39.pyc
3.1 KB
02/11/2025 08:19:48 AM
rw-r--r--
📄
parallelism_framework_util.cpython-39.pyc
11.79 KB
02/11/2025 08:19:48 AM
rw-r--r--
📄
posix_util.cpython-39.pyc
12.46 KB
02/11/2025 08:19:49 AM
rw-r--r--
📄
retention_util.cpython-39.pyc
8.77 KB
02/11/2025 08:19:49 AM
rw-r--r--
📄
retry_util.cpython-39.pyc
2.5 KB
02/11/2025 08:19:49 AM
rw-r--r--
📄
rsync_util.cpython-39.pyc
1.6 KB
02/11/2025 08:19:49 AM
rw-r--r--
📄
shim_util.cpython-39.pyc
19.8 KB
02/11/2025 08:19:49 AM
rw-r--r--
📄
signurl_helper.cpython-39.pyc
4.21 KB
02/11/2025 08:19:49 AM
rw-r--r--
📄
stet_util.cpython-39.pyc
3.35 KB
02/11/2025 08:19:49 AM
rw-r--r--
📄
system_util.cpython-39.pyc
7.9 KB
02/11/2025 08:19:48 AM
rw-r--r--
📄
temporary_file_util.cpython-39.pyc
915 bytes
02/11/2025 08:19:49 AM
rw-r--r--
📄
text_util.cpython-39.pyc
12.62 KB
02/11/2025 08:19:48 AM
rw-r--r--
📄
translation_helper.cpython-39.pyc
25.67 KB
02/11/2025 08:19:48 AM
rw-r--r--
📄
unit_util.cpython-39.pyc
7.01 KB
02/11/2025 08:19:48 AM
rw-r--r--
📄
update_util.cpython-39.pyc
3.39 KB
02/11/2025 08:19:49 AM
rw-r--r--
📄
user_agent_helper.cpython-39.pyc
1.49 KB
02/11/2025 08:19:48 AM
rw-r--r--
📄
version_check.cpython-39.pyc
1.39 KB
02/11/2025 08:19:48 AM
rw-r--r--
📄
wrapped_credentials.cpython-39.pyc
5.81 KB
02/11/2025 08:19:49 AM
rw-r--r--
Editing: update_util.cpython-39.pyc
Close
a +(Wg� � @ s� d Z ddlmZ ddlmZ ddlmZ ddlmZ ddlZddlZddlZddl Z ddl Z ddlZddlm Z ddlmZ dd lmZ dd lmZ ddlmZ ejfdd �Zdd� Zdd� ZdS )z<Shared utility methods for the update command and its tests.� )�absolute_import)�print_function)�division)�unicode_literalsN)�IS_OSX)�CommandException)�StorageUrlFromString)�GSUTIL_PUB_TARBALL)�GSUTIL_PUB_TARBALL_PY2c C s ddg}z~t tj�| d�d��V}|D ]@}|�d�rF|�|�� d � q$t�d|�r$|�|�� d � q$W d � n1 sz0 Y W n$ t y� t �� �d | � Y dS 0 d }t� | �D ]D}|�d�s�||v r�q�||vr�td�t�d tj�tj|� ����q�dS )aI Disallows the update command if files not in the gsutil distro are found. This prevents users from losing data if they are in the habit of running gsutil from the gsutil directory and leaving data in that directory. This will also detect someone attempting to run gsutil update from a git repo, since the top-level directory will contain git files and dirs (like .git) that are not distributed with gsutil. Args: directory: (str) The directory to use this functionality on. Raises: CommandException: if files other than those distributed with gsutil found. zMANIFEST.in�third_party�rzinclude ���zrecursive-include \w+ \*� Nz7MANIFEST.in not found in %s. Skipping user data check. )z .coveragez .DS_Store�.githubz.style.yapfz.yapfignore�__pycache__r z.pyc� z�A file (%s) that is not distributed with gsutil was found in the gsutil directory. The update command cannot run with user data in the gsutil directory.)�open�os�path�join� startswith�append�split�re�match�IOError�logging� getLogger�warn�listdir�endswithr �textwrap�wrap�gslib� GSUTIL_DIR)� directoryZmanifest_lines�fp�lineZ addl_excludes�filename� r) �&/opt/gsutil/gslib/utils/update_util.py�DisallowUpdateIfDataInGsutilDir'