From 2aead918bf0c5ee87cb7167f150acd5fb17440a4 Mon Sep 17 00:00:00 2001 From: Davte Date: Sun, 12 Apr 2020 00:29:39 +0200 Subject: [PATCH] Do not check file_path if it is None --- src/client.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/client.py b/src/client.py index 80112a0..c286d2b 100644 --- a/src/client.py +++ b/src/client.py @@ -450,14 +450,14 @@ def main(): path=input(f"Enter file to send:\t\t\t\t\t\t"), action=action ) - if not os.path.isfile(os.path.abspath(file_path)): + if file_path and not os.path.isfile(os.path.abspath(file_path)): file_path = None elif action == 'receive': file_path = get_file_path( path=input(f"Enter destination folder:\t\t\t\t\t\t"), action=action ) - if not os.path.isdir(os.path.abspath(file_path)): + if file_path and not os.path.isdir(os.path.abspath(file_path)): file_path = None if password is None: logging.warning(