OpenQuizz
Une application de gestion des contenus pédagogiques
SectionConstraint Class Reference
Inheritance diagram for SectionConstraint:
Collaboration diagram for SectionConstraint:

Public Member Functions

def __init__ (self, config, section)
 
def __del__ (self)
 
def __getattr__ (self, attr)
 
def config (self)
 
def release (self)
 
def __enter__ (self)
 
def __exit__ (self, exception_type, exception_value, traceback)
 

Detailed Description

Constrains a ConfigParser to only option commands which are constrained to
always use the section we have been initialized with.

It supports all ConfigParser methods that operate on an option.

:note:
    If used as a context manager, will release the wrapped ConfigParser.

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
  config,
  section 
)

◆ __del__()

def __del__ (   self)

Member Function Documentation

◆ __enter__()

def __enter__ (   self)

◆ __exit__()

def __exit__ (   self,
  exception_type,
  exception_value,
  traceback 
)

◆ __getattr__()

def __getattr__ (   self,
  attr 
)

◆ config()

def config (   self)
return: Configparser instance we constrain

◆ release()

def release (   self)
Equivalent to GitConfigParser.release(), which is called on our underlying parser instance

The documentation for this class was generated from the following file: