More cleanup.
[python_utils.git] / file_utils.py
index 6bcfc75db47efa6d2da2327cdd42284c589901d4..d1e2eff1fac729b6251179ad7dfc584a0674215f 100644 (file)
@@ -6,7 +6,6 @@ import datetime
 import errno
 import glob
 import hashlib
-import io
 import logging
 import os
 import pathlib
@@ -190,7 +189,7 @@ def create_path_if_not_exist(path, on_error=None):
     >>> os.path.exists(path)
     True
     """
-    logger.debug(f"Creating path {path}")
+    logger.debug("Creating path %s", path)
     previous_umask = os.umask(0)
     try:
         os.makedirs(path)
@@ -462,6 +461,11 @@ def get_files_recursive(directory: str):
 
 
 class FileWriter(object):
+    """A helper that writes a file to a temporary location and then moves
+    it atomically to its ultimate destination on close.
+
+    """
+
     def __init__(self, filename: str) -> None:
         self.filename = filename
         uuid = uuid4()