From ead9d1cad9b8c2029a9326326b9ec195bf2ee06d Mon Sep 17 00:00:00 2001 From: Jylpah Date: Fri, 10 Jul 2020 12:15:54 +0300 Subject: [PATCH] Add rebase_file_args() Since the scripts move their working dir to the script's location --- blitzutils.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/blitzutils.py b/blitzutils.py index 48c2f77..acc6bff 100644 --- a/blitzutils.py +++ b/blitzutils.py @@ -348,6 +348,10 @@ def NOW() -> int: return int(time.time()) +def rebase_file_args(current_dir, files): + """REbase file command line params after moving working dir to the script's dir""" + return [ os.path.join(current_dir, fn) for fn in files ] + async def read_int_list(filename: str) -> list(): """Read file to a list and return list of integers in the input file"""