added logging message

This commit is contained in:
Hellow2 2023-06-22 12:44:46 +02:00
parent 49845c5ecd
commit 058bb50783

View File

@ -1,5 +1,6 @@
from pathlib import Path from pathlib import Path
from typing import List, Tuple, TextIO from typing import List, Tuple, TextIO
import logging
import requests import requests
from tqdm import tqdm from tqdm import tqdm
@ -8,6 +9,9 @@ from .parents import DatabaseObject
from ..utils import shared from ..utils import shared
LOGGER = logging.getLogger("target")
class Target(DatabaseObject): class Target(DatabaseObject):
""" """
create somehow like that create somehow like that
@ -67,6 +71,7 @@ class Target(DatabaseObject):
def copy_content(self, copy_to: "Target"): def copy_content(self, copy_to: "Target"):
if not self.exists: if not self.exists:
LOGGER.warning(f"No file exists at: {self.file_path}")
return return
with open(self.file_path, "rb") as read_from: with open(self.file_path, "rb") as read_from: