Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix intermittent system tests failure caused by creating the output directory twice #590

Merged
merged 1 commit into from
Jan 9, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions pixl_core/src/core/uploader/_ftps.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,10 +195,10 @@

def _create_and_set_as_cwd(ftp: FTP_TLS, project_dir: str) -> None:
try:
ftp.cwd(project_dir)
logger.debug("'{}' exists on remote ftp, so moving into it", project_dir)
except ftplib.error_perm:
logger.info("creating '{}' on remote ftp and moving into it", project_dir)
# Directory doesn't exist, so create it
ftp.mkd(project_dir)
ftp.cwd(project_dir)
except ftplib.error_perm:
logger.debug("'{}' exists on remote ftp, so moving into it", project_dir)

Check warning on line 200 in pixl_core/src/core/uploader/_ftps.py

View check run for this annotation

Codecov / codecov/patch

pixl_core/src/core/uploader/_ftps.py#L199-L200

Added lines #L199 - L200 were not covered by tests
else:
logger.info("created '{}' on remote ftp and moving into it", project_dir)

Check warning on line 202 in pixl_core/src/core/uploader/_ftps.py

View check run for this annotation

Codecov / codecov/patch

pixl_core/src/core/uploader/_ftps.py#L202

Added line #L202 was not covered by tests

ftp.cwd(project_dir)

Check warning on line 204 in pixl_core/src/core/uploader/_ftps.py

View check run for this annotation

Codecov / codecov/patch

pixl_core/src/core/uploader/_ftps.py#L204

Added line #L204 was not covered by tests