Add .tmp to temporary capture files for clarity

This commit is contained in:
Joel Collins 2018-11-20 18:55:30 +00:00
parent ea3ae9f898
commit c249e846dc

View file

@ -16,7 +16,7 @@ class StreamObject(object):
""" """
def __init__( def __init__(
self, self,
write_to_file: bool=None, write_to_file: bool=False,
keep_on_disk: bool=True, keep_on_disk: bool=True,
filename: str=None, filename: str=None,
folder: str=None, folder: str=None,
@ -81,6 +81,10 @@ class StreamObject(object):
Defaults to datestamp. Defaults to datestamp.
""" """
appendix = ""
if not self.keep_on_disk:
appendix += ".tmp"
file_name = "{}.{}".format(filename, fmt) file_name = "{}.{}".format(filename, fmt)
# Create folder and file # Create folder and file