refractor function so that, doesn't fail if config is null on import
This commit is contained in:
@@ -18,8 +18,10 @@ class Gallery:
|
||||
self.opt_args: str | Sequence[str] = ""
|
||||
self.command: list[str] = []
|
||||
|
||||
def generate_command(self, user: User = User(1), is_comic: bool = False) -> None:
|
||||
def generate_command(self, user: User | None = None, is_comic: bool = False) -> None:
|
||||
"""Generates a command string."""
|
||||
if user is None:
|
||||
user = User(1)
|
||||
if is_comic:
|
||||
configs = load_config_variables()
|
||||
directory = str(configs["comic"]["download-dir"])
|
||||
|
||||
Reference in New Issue
Block a user