-n flag no longer required for recursive mode

This commit is contained in:
2025-10-05 12:12:49 +02:00
parent f7ab347316
commit 46ea1db65d
4 changed files with 4 additions and 16 deletions

View File

@@ -5,18 +5,13 @@ import sys
from .refit_logger import logger
from . import librefit
# logger.debug("Initiated refit_create.py")
# ----------------------------------------------------------------------
class Refit_Create:
"""A class to create folders and files.
It first calls the decider which lets the create_input_valid() function
check if the input argument exists. If create_input_valid() returns
'True' it continues to execute the command as per the given arguments.
default folder name: directory"""
'True' it continues to execute the command as per the given arguments."""
def __init__(self, args):
"""Initiating variables for creation"""
@@ -122,16 +117,13 @@ class Refit_Create:
sys.exit(1)
# Exit the program if the -n argument is not passed
if self.n is None:
if self.n is None and self.recursive is None:
logger.error(
f"FUNC create_dispatcher(n=None ?) MSG: the number value cannot be '{self.n}'"
)
print("Use the '-n' flag for the create command.")
sys.exit(1)
else:
logger.debug(
f"FUNC: input_validator() MSG: valid number entered n={self.n}"
)
return True
def create_dispatcher(self):