fix exist to exists

This commit is contained in:
Jakobus Schürz 2020-03-22 04:37:13 +01:00
parent 7f99c7779d
commit 723ed0a433

View file

@ -307,7 +307,7 @@ def main(args):
mountpoint = Path(os.path.join(os.environ['HOME'], args.mountpoint)) mountpoint = Path(os.path.join(os.environ['HOME'], args.mountpoint))
if mountpoint.is_symlink(): if mountpoint.is_symlink():
mountpoint.unlink(); mountpoint.unlink();
if mountpoint.exist(): if mountpoint.exists():
mountpoint.rename(mountpoint + datetime.now().strftime("%Y-%m-%d") mountpoint.rename(mountpoint + datetime.now().strftime("%Y-%m-%d")
+ ''.join(random.choice( + ''.join(random.choice(
string.ascii_uppercase + string.digits) for _ in range(6)) string.ascii_uppercase + string.digits) for _ in range(6))