From e87f0aed485b95bc06d2de1ba21d0f51d593b818 Mon Sep 17 00:00:00 2001 From: TomorrowIsAnOtherDay <2466956298@qq.com> Date: Tue, 9 Jun 2020 20:24:45 +0800 Subject: [PATCH] ban passing a absolute path --- parl/remote/client.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/parl/remote/client.py b/parl/remote/client.py index 7e095ff..fd17adb 100644 --- a/parl/remote/client.py +++ b/parl/remote/client.py @@ -105,6 +105,9 @@ class Client(object): for file in distributed_files: assert os.path.exists(file) + assert not os.path.isabs( + file + ), "[XPARL] Please do not distribute a file with absolute path." with open(file, 'rb') as f: content = f.read() pyfiles['other_files'][file] = content -- GitLab