summaryrefslogtreecommitdiff
path: root/file_utils.py
diff options
context:
space:
mode:
authorScott Gasch <[email protected]>2022-02-08 14:38:15 -0800
committerScott Gasch <[email protected]>2022-02-08 14:38:15 -0800
commit0d63d44ac89aab38fe95f36497adaf95110ab949 (patch)
tree150c4fa334505d17d830592901d6b96b3a4d464e /file_utils.py
parent5c212d7639f62fcb936f9d7a0bbe704a9f7b213d (diff)
More cleanup.
Diffstat (limited to 'file_utils.py')
-rw-r--r--file_utils.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/file_utils.py b/file_utils.py
index 6bcfc75..d1e2eff 100644
--- a/file_utils.py
+++ b/file_utils.py
@@ -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()