From 405c207f8cbbbe166fd8b9e83bd664d95f6b0087 Mon Sep 17 00:00:00 2001 From: Sebastian Spaeth Date: Wed, 19 Apr 2023 18:29:50 +0200 Subject: [PATCH] Clean up code comments a little --- cleanmedia | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/cleanmedia b/cleanmedia index c6600a4..7f6bf97 100755 --- a/cleanmedia +++ b/cleanmedia @@ -25,13 +25,11 @@ try: import psycopg2 import yaml except ImportError as e: - print("Please install psycopg2 and pyyaml") - exit(1) + raise Exception("Please install psycopg2 and pyyaml") - -#------------------------------------------------------------------------------------ +#------------------------------------------------------------------------------ class File: - """Represents a file in our database together with (hopefully) a physical file and thumbnails""" + """A file in our db together with (hopefully) a physical file and thumbnails""" def __init__(self, media_repo: 'MediaRepository', media_id: str, creation_ts: int, base64hash: str): # The MediaRepository in which this file is recorded @@ -91,9 +89,8 @@ class File: return(int(row[0])) #---------------------------------------------------------------------- class MediaRepository: - + """A dendrite media repository""" def __init__(self, media_path: Path, connection_string: str): - # media_path is a pathlib.Path self.media_path = media_path if not self.media_path.is_absolute(): logging.warn("The media path is relative, make sure you run this script in the correct directory!")