From 938709465c075904f67ee1c83ff4d84f8f23d40b Mon Sep 17 00:00:00 2001 From: Alexei Sorokin Date: Wed, 24 Aug 2016 17:20:19 +0300 Subject: [PATCH] Use os.path.join() instead of concatenating manually --- hptoad.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hptoad.py b/hptoad.py index 6182001..e093cf4 100755 --- a/hptoad.py +++ b/hptoad.py @@ -89,7 +89,7 @@ class Zhobe: if not self._cmd_validator_regexp.match(cmd[0]): return None, "Bad command \"%s\"" % cmd[0] - path = "%s/%s" % (dir_path, self.trim(cmd[0][1:])) + path = os.path.join(dir_path, self.trim(cmd[0][1:])) if not os.access(path, os.F_OK): return None, "\"%s\" does not exist" % path