Skip to content

Commit

Permalink
Capture ImportTestRun specifically
Browse files Browse the repository at this point in the history
  • Loading branch information
GeigerJ2 committed May 27, 2024
1 parent 6291acc commit 7f377fc
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/aiida/cmdline/commands/cmd_archive.py
Original file line number Diff line number Diff line change
Expand Up @@ -480,6 +480,7 @@ def _import_archive_and_migrate(

from aiida.common.folders import SandboxFolder
from aiida.tools.archive.abstract import get_format
from aiida.tools.archive.exceptions import ImportTestRun
from aiida.tools.archive.imports import import_archive as _import_archive

archive_format = get_format()
Expand Down Expand Up @@ -521,6 +522,12 @@ def _import_archive_and_migrate(
)
else:
_echo_exception(f'an exception occurred while trying to import the archive {archive}', exception)
except ImportTestRun:
echo.echo_success(

Check warning on line 526 in src/aiida/cmdline/commands/cmd_archive.py

View check run for this annotation

Codecov / codecov/patch

src/aiida/cmdline/commands/cmd_archive.py#L525-L526

Added lines #L525 - L526 were not covered by tests
f'Import dry-run of archive {archive} terminated successfully. Profile storage unmodified.'
)
return

Check warning on line 529 in src/aiida/cmdline/commands/cmd_archive.py

View check run for this annotation

Codecov / codecov/patch

src/aiida/cmdline/commands/cmd_archive.py#L529

Added line #L529 was not covered by tests

except Exception as exception:
_echo_exception(f'an exception occurred while trying to import the archive {archive}', exception)

Expand Down

0 comments on commit 7f377fc

Please sign in to comment.