swarming: replace unicde with six.text_type

Bug: 1010816
Change-Id: I1c383b371eab9dbeb2db3504104602ebaa795c62
Reviewed-on: https://chromium-review.googlesource.com/c/infra/luci/luci-py/+/1868477
Auto-Submit: Takuto Ikuta <tikuta@chromium.org>
Reviewed-by: Junji Watanabe <jwata@google.com>
Commit-Queue: Junji Watanabe <jwata@google.com>
Cr-Mirrored-From: https://chromium.googlesource.com/infra/luci/luci-py
Cr-Mirrored-Commit: ae2c15903e06ab233fd69e0777d05505ef6b9554
diff --git a/utils/logging_utils.py b/utils/logging_utils.py
index de60563..14e3c3d 100644
--- a/utils/logging_utils.py
+++ b/utils/logging_utils.py
@@ -17,6 +17,8 @@
 import tempfile
 import time
 
+import six
+
 from utils import file_path
 
 # This works around file locking issue on Windows specifically in the case of
@@ -53,7 +55,7 @@
 
     See https://bugs.python.org/issue15244 for inspiration.
     """
-    path = unicode(path)
+    path = six.text_type(path)
     handle = ctypes.windll.kernel32.CreateFileW(
         path,
         GENERIC_READ|GENERIC_WRITE,
@@ -202,7 +204,8 @@
   # Setup up logging to a constant file so we can debug issues where
   # the results aren't properly sent to the result URL.
   if filename:
-    file_path.ensure_tree(os.path.dirname(os.path.abspath(unicode(filename))))
+    file_path.ensure_tree(
+        os.path.dirname(os.path.abspath(six.text_type(filename))))
     try:
       rotating_file = NoInheritRotatingFileHandler(
           filename, maxBytes=10 * 1024 * 1024, backupCount=5,