Skip to content

Commit

Permalink
skip logs directory
Browse files Browse the repository at this point in the history
  • Loading branch information
itamarga committed Jan 23, 2024
1 parent 7a3a078 commit d110fa8
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions intezer_analyze_cli/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -415,14 +415,10 @@ def _get_scan_subdirectories(offline_scans_root_directory):
directories = [d for d in os.listdir(offline_scans_root_directory) if
os.path.isdir(os.path.join(offline_scans_root_directory, d)) and
not is_hidden(os.path.join(offline_scans_root_directory, d))]
for mandatory_directory in ('files', 'fileless', 'memory_modules'):
if mandatory_directory not in directories:
click.echo(f'Directory "{mandatory_directory}" is missing')
raise click.Abort()
directories.remove(mandatory_directory)
for dir in ('files', 'fileless', 'memory_modules', 'logs'):
directories.remove(dir)
return directories


def _was_directory_already_sent(path: str) -> bool:
try:
if os.path.isfile(os.path.join(path, 'analysis_id.txt')):
Expand Down Expand Up @@ -452,3 +448,4 @@ def _create_analysis_id_file(directory: str, analysis_id: str):
logger.exception('Could not create analysis_id.txt file', extra=dict(directory=directory))
click.echo(f'Could not create analysis_id.txt file in {directory}')
raise

0 comments on commit d110fa8

Please sign in to comment.