Fix for issue #262
This commit is contained in:
@@ -1588,7 +1588,6 @@ def export(
|
|||||||
(shared, not_shared),
|
(shared, not_shared),
|
||||||
(has_comment, no_comment),
|
(has_comment, no_comment),
|
||||||
(has_likes, no_likes),
|
(has_likes, no_likes),
|
||||||
(export_as_hardlink, cleanup),
|
|
||||||
]
|
]
|
||||||
if any(all(bb) for bb in exclusive):
|
if any(all(bb) for bb in exclusive):
|
||||||
click.echo("Incompatible export options", err=True)
|
click.echo("Incompatible export options", err=True)
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
""" version info """
|
""" version info """
|
||||||
|
|
||||||
__version__ = "0.37.6"
|
__version__ = "0.37.7"
|
||||||
|
|
||||||
|
|||||||
@@ -3961,26 +3961,3 @@ def test_export_cleanup():
|
|||||||
assert not pathlib.Path("./delete_me.txt").is_file()
|
assert not pathlib.Path("./delete_me.txt").is_file()
|
||||||
assert not pathlib.Path("./foo/delete_me_too.txt").is_file()
|
assert not pathlib.Path("./foo/delete_me_too.txt").is_file()
|
||||||
|
|
||||||
|
|
||||||
def test_export_cleanup_export_as_hardling():
|
|
||||||
""" test export with incompatible option """
|
|
||||||
import os
|
|
||||||
import os.path
|
|
||||||
from osxphotos.__main__ import export
|
|
||||||
|
|
||||||
runner = CliRunner()
|
|
||||||
cwd = os.getcwd()
|
|
||||||
# pylint: disable=not-context-manager
|
|
||||||
with runner.isolated_filesystem():
|
|
||||||
result = runner.invoke(
|
|
||||||
export,
|
|
||||||
[
|
|
||||||
os.path.join(cwd, CLI_PHOTOS_DB),
|
|
||||||
".",
|
|
||||||
"-V",
|
|
||||||
"--export-as-hardlink",
|
|
||||||
"--cleanup",
|
|
||||||
],
|
|
||||||
)
|
|
||||||
assert "Incompatible export options" in result.output
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user