From 44a1ba89c7432c83e1fffbf4c16917ab645ee299 Mon Sep 17 00:00:00 2001 From: Munyoki Kilyungi Date: Mon, 11 Sep 2023 18:47:54 +0300 Subject: Replace string concat with os.path.join. * wqflask/utility/tools.py (assert_writable_dir): Use "os.path.join" to concatenate paths. Signed-off-by: Munyoki Kilyungi --- wqflask/utility/tools.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wqflask/utility/tools.py b/wqflask/utility/tools.py index 4c331f8a..3dc01b91 100644 --- a/wqflask/utility/tools.py +++ b/wqflask/utility/tools.py @@ -158,7 +158,7 @@ def assert_dir(the_dir): def assert_writable_dir(dir): try: - fn = dir + "/test.txt" + fn = os.path.join(dir, "test.txt") fh = open(fn, 'w') fh.write("I am writing this text to the file\n") fh.close() -- cgit 1.4.1