Add bold, perfect symbols

This commit is contained in:
jpic 2020-02-15 19:08:43 +01:00
parent 67aca9de44
commit 93de46b061
3 changed files with 16 additions and 8 deletions

View File

@ -9,8 +9,8 @@ colors = dict(
blue3='\u001b[38;5;81m',
blue4='\u001b[38;5;111m',
blue5='\u001b[38;5;27m',
green='\u001b[38;5;2m',
green1='\u001b[38;5;10m',
green='\u001b[38;5;10m',
green1='\u001b[38;5;2m',
green2='\u001b[38;5;46m',
green3='\u001b[38;5;47m',
green4='\u001b[38;5;48m',
@ -61,3 +61,8 @@ colors = dict(
orange5='\u001b[38;5;166m',
reset='\u001b[0m',
)
colors.update({
k + 'bold': v.replace('[', '[1;')
for k, v in colors.items()
})

View File

@ -89,24 +89,24 @@ class Output:
def start(self, action):
self(''.join([
self.colors['orange'],
'[!] START ',
self.colors['orangebold'],
' START ',
self.colors['reset'],
action.colorized(),
]))
def success(self, action):
self(''.join([
self.colors['green'],
'[√] SUCCESS ',
self.colors['greenbold'],
' SUCCESS ',
self.colors['reset'],
action.colorized(),
]))
def fail(self, action, exception=None):
self(''.join([
self.colors['red'],
'[x] FAIL ',
self.colors['redbold'],
' FAIL ',
self.colors['reset'],
action.colorized(),
]))

View File

@ -124,6 +124,9 @@ class Buildah(Localhost):
cli.exit_code = await proc.wait()
async def commit(self):
if not self.image:
return
self.sha = (await self.exec(
'buildah',
'commit',