import logging
from . import logger
+from . import tui
# Setup logging
log = logging.getLogger("bricklayer")
if debug:
log.setLevel(logging.DEBUG)
+ # Initialise the text user interface
+ self.tui = tui.Tui(self)
+
# Log when we are ready
if self.test:
log.info("Bricklayer initialized in test mode")
log.info("Bricklayer initialized")
def __call__(self):
- pass
+ with self.tui:
+ pass
--- /dev/null
+###############################################################################
+# #
+# Bricklayer - An Installer for IPFire #
+# Copyright (C) 2021 IPFire Development Team #
+# #
+# This program is free software; you can redistribute it and/or #
+# modify it under the terms of the GNU General Public License #
+# as published by the Free Software Foundation; either version 2 #
+# of the License, or (at your option) any later version. #
+# #
+# This program is distributed in the hope that it will be useful, #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
+# GNU General Public License for more details. #
+# #
+# You should have received a copy of the GNU General Public License #
+# along with this program. If not, see <http://www.gnu.org/licenses/>. #
+# #
+###############################################################################
+
+import logging
+
+# Setup logging
+log = logging.getLogger("bricklayer.tui")
+
+class Tui(object):
+ def __init__(self, bricklayer):
+ self.bricklayer = bricklayer
+
+ # Make this class usable as context
+
+ def __enter__(self):
+ return self
+
+ def __exit__(self, type, value, traceback):
+ pass