Skip to content

Commit

Permalink
Revert "Attempt to add new Snyk issue"
Browse files Browse the repository at this point in the history
This reverts commit 8a2e214.
  • Loading branch information
b-boogaard committed Nov 5, 2024
1 parent 8a2e214 commit 8d12253
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions b2/_internal/console_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -1913,20 +1913,6 @@ def _represent_legal_hold(cls, legal_hold: LegalHold):
raise ValueError(f'Unsupported legal hold: {legal_hold}')

def _print_file_attribute(self, label, value):

# This chunk of code seems to trigger a Snyk issue.
fd_handle, output_filepath_str = tempfile.mkstemp(
prefix='prefix',
suffix='file_extension',
dir='output_directory',
)
# Close the handle, so the file is not locked.
# This file is no longer 100% "safe", but that's acceptable.
os.close(fd_handle)

# "Normal" file created by Python has readable for everyone, writable for user only.
# We change the permissions, to match the default ones.
os.chmod(output_filepath_str, 0o644)
self._print((label + ':').ljust(20) + ' ' + value)

def get_local_output_filepath(
Expand Down

0 comments on commit 8d12253

Please sign in to comment.