-n flag no longer required for recursive mode
This commit is contained in:
@@ -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):
|
||||
|
||||
@@ -10,11 +10,6 @@ from modules.refit_create import Refit_Create
|
||||
CONFIG_FILE = "version.cfg"
|
||||
|
||||
|
||||
# TODO: comment the actions done in read_version_config()
|
||||
|
||||
|
||||
# TODO: see the TODO in librefit: move the config file section into the
|
||||
# libary
|
||||
def read_version_config():
|
||||
# logger.debug(f"Start read_version_config() with config file: {CONFIG_FILE}")
|
||||
config = configparser.ConfigParser()
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
[VERSION]
|
||||
major = 0
|
||||
minor = 3
|
||||
patch = 5
|
||||
patch = 6
|
||||
|
||||
|
||||
Reference in New Issue
Block a user