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', blue3='\u001b[38;5;81m',
blue4='\u001b[38;5;111m', blue4='\u001b[38;5;111m',
blue5='\u001b[38;5;27m', blue5='\u001b[38;5;27m',
green='\u001b[38;5;2m', green='\u001b[38;5;10m',
green1='\u001b[38;5;10m', green1='\u001b[38;5;2m',
green2='\u001b[38;5;46m', green2='\u001b[38;5;46m',
green3='\u001b[38;5;47m', green3='\u001b[38;5;47m',
green4='\u001b[38;5;48m', green4='\u001b[38;5;48m',
@ -61,3 +61,8 @@ colors = dict(
orange5='\u001b[38;5;166m', orange5='\u001b[38;5;166m',
reset='\u001b[0m', 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): def start(self, action):
self(''.join([ self(''.join([
self.colors['orange'], self.colors['orangebold'],
'[!] START ', ' START ',
self.colors['reset'], self.colors['reset'],
action.colorized(), action.colorized(),
])) ]))
def success(self, action): def success(self, action):
self(''.join([ self(''.join([
self.colors['green'], self.colors['greenbold'],
'[√] SUCCESS ', ' SUCCESS ',
self.colors['reset'], self.colors['reset'],
action.colorized(), action.colorized(),
])) ]))
def fail(self, action, exception=None): def fail(self, action, exception=None):
self(''.join([ self(''.join([
self.colors['red'], self.colors['redbold'],
'[x] FAIL ', ' FAIL ',
self.colors['reset'], self.colors['reset'],
action.colorized(), action.colorized(),
])) ]))

View File

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