From 4ad9bf1b440044614227bdd9810e687fb70ff7aa Mon Sep 17 00:00:00 2001 From: Thor77 Date: Mon, 13 Jul 2015 20:35:37 +0200 Subject: [PATCH] improve abspath-resolve --- tsstats.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tsstats.py b/tsstats.py index cbfaee7..82e8f7b 100755 --- a/tsstats.py +++ b/tsstats.py @@ -118,7 +118,10 @@ class Client: re_dis_connect = re.compile(r"'(.*)'\(id:(\d*)\)") re_disconnect_invoker = re.compile(r"invokername=(.*)\ invokeruid=(.*)\ reasonmsg") -abspath = sep.join(__file__.split(sep)[:-1]) + sep +path_split = __file__.split(sep)[:-1] +abspath = sep.join(path_split) +if len(path_split) > 0: + abspath += sep def parse_logs(logpath, file_log=False):