mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-08-30 07:18:09 +02:00
Optimized Dockerfile and github workflow
This commit is contained in:
19
main.py
19
main.py
@@ -18,7 +18,24 @@ except ImportError:
|
||||
def __getattr__(self, name): return ''
|
||||
Fore = Back = Style = Dummy()
|
||||
|
||||
from cli.sounds import Sound # ensure Sound imported
|
||||
_IN_DOCKER = os.path.exists('/.dockerenv')
|
||||
|
||||
if _IN_DOCKER:
|
||||
class Quiet:
|
||||
@staticmethod
|
||||
def play_start_sound(): pass
|
||||
@staticmethod
|
||||
def play_cymais_intro_sound(): pass
|
||||
@staticmethod
|
||||
def play_finished_successfully_sound(): pass
|
||||
@staticmethod
|
||||
def play_finished_failed_sound(): pass
|
||||
@staticmethod
|
||||
def play_warning_sound(): pass
|
||||
|
||||
Sound = Quiet
|
||||
else:
|
||||
from utils.sounds import Sound
|
||||
|
||||
|
||||
def color_text(text, color):
|
||||
|
Reference in New Issue
Block a user