2
0
mirror of https://github.com/openvswitch/ovs synced 2025-09-04 16:25:17 +00:00

vlog: Use python 2.4 compatible functions.

Xenserver uses python 2.4.

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
This commit is contained in:
Gurucharan Shetty
2014-05-05 12:30:48 -07:00
parent 696d1bcf6c
commit dde7b5cd29

View File

@@ -107,12 +107,12 @@ class Vlog:
ms = delta.microseconds / 1000 ms = delta.microseconds / 1000
tmp = self._format_field(tmp, m, str(ms)) tmp = self._format_field(tmp, m, str(ms))
elif "t" in m: elif "t" in m:
subprogram = threading.current_thread().name subprogram = threading.currentThread().getName()
if subprogram == "MainThread": if subprogram == "MainThread":
subprogram = "main" subprogram = "main"
tmp = self._format_field(tmp, m, subprogram) tmp = self._format_field(tmp, m, subprogram)
elif "T" in m: elif "T" in m:
subprogram = threading.current_thread().name subprogram = threading.currentThread().getName()
if not subprogram == "MainThread": if not subprogram == "MainThread":
subprogram = "({})".format(subprogram) subprogram = "({})".format(subprogram)
else: else: