Skip to content

Commit 1608cdc

Browse files
committed
prefer os.path.samefile() for checkpoint test
1 parent 0d896ab commit 1608cdc

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ Internal
3535
* Improve test coverage for DSN variable expansion.
3636
* Test on all platforms in the Publish GitHub Action.
3737
* Remove unused support for writing `.mylogin.cnf` files.
38+
* Prefer `os.path.samefile()` for checkpoint distinctness test.
3839

3940

4041
1.76.0 (2026/06/20)

mycli/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ def preprocess_cli_args(
329329
and cli_args.batch != '-'
330330
and os.path.exists(cli_args.batch)
331331
):
332-
if os.stat(cli_args.batch) == os.stat(cli_args.checkpoint):
332+
if os.path.samefile(cli_args.batch, cli_args.checkpoint):
333333
click.secho('Error: --batch and --checkpoint must be different files.', err=True, fg='red')
334334
sys.exit(1)
335335

0 commit comments

Comments
 (0)