sane-tag-media: remove unused "confirm" function
This commit is contained in:
@@ -915,7 +915,6 @@ class Tagger:
|
|||||||
|
|
||||||
self.show_tagdif(file_.path_, old_tags, new_tags)
|
self.show_tagdif(file_.path_, old_tags, new_tags)
|
||||||
|
|
||||||
if self.confirm():
|
|
||||||
if self.guard_dry_run("writing tags"):
|
if self.guard_dry_run("writing tags"):
|
||||||
file_.write_tags(new_tags)
|
file_.write_tags(new_tags)
|
||||||
|
|
||||||
@@ -932,7 +931,6 @@ class Tagger:
|
|||||||
|
|
||||||
self.show_pathdif(file_.path_, new_path)
|
self.show_pathdif(file_.path_, new_path)
|
||||||
|
|
||||||
if self.confirm():
|
|
||||||
if self.guard_dry_run(f"moving file"):
|
if self.guard_dry_run(f"moving file"):
|
||||||
assert not os.path.exists(new_path), f"{file_.path_} -> {new_path} would clobber destination!"
|
assert not os.path.exists(new_path), f"{file_.path_} -> {new_path} would clobber destination!"
|
||||||
# os.renames creates the necessary parents, and then prunes leaf directories
|
# os.renames creates the necessary parents, and then prunes leaf directories
|
||||||
@@ -952,10 +950,6 @@ class Tagger:
|
|||||||
logger.debug(f"skipping unchanged {path_}")
|
logger.debug(f"skipping unchanged {path_}")
|
||||||
logger.debug(f" {tags}")
|
logger.debug(f" {tags}")
|
||||||
|
|
||||||
def confirm(self) -> bool:
|
|
||||||
# TODO: actually prompt
|
|
||||||
return True
|
|
||||||
|
|
||||||
def guard_dry_run(self, msg: str) -> bool:
|
def guard_dry_run(self, msg: str) -> bool:
|
||||||
if self.dry_run:
|
if self.dry_run:
|
||||||
print(f"dry run: not {msg}")
|
print(f"dry run: not {msg}")
|
||||||
|
Reference in New Issue
Block a user