1
0
mirror of https://github.com/CumulusNetworks/ifupdown2.git synced 2024-05-06 15:54:50 +00:00

Replace check mark by none and cross mark by ascii 'x' in --check output

Ticket: CM-3810
Reviewed By:
Testing Done:

These are configurable via strings check_success_str and check_error_str
in /etc/network/ifupdown2/ifupdown2.conf
This commit is contained in:
Roopa Prabhu
2014-10-10 14:52:11 -07:00
parent 8c13865cd4
commit e57b12e75a
2 changed files with 6 additions and 6 deletions

View File

@ -436,9 +436,9 @@ class iface():
if with_status:
if (self.status == ifaceStatus.NOTFOUND or
self.status == ifaceStatus.ERROR):
outbuf += ' (%s)' %errorstr
outbuf += ' %s' %errorstr
elif self.status == ifaceStatus.SUCCESS:
outbuf += ' (%s)' %successstr
outbuf += ' %s' %successstr
if self.status == ifaceStatus.NOTFOUND:
if with_status:
outbuf = (outbuf.encode('utf8')
@ -455,10 +455,10 @@ class iface():
if with_status:
s = self.get_config_attr_status(cname, idx)
if s:
outbuf += (indent + '%s %s (%s)\n'
outbuf += (indent + '%s %s %s\n'
%(cname, cv, errorstr))
elif s == 0:
outbuf += (indent + '%s %s (%s)\n'
outbuf += (indent + '%s %s %s\n'
%(cname, cv, successstr))
else:
outbuf += indent + '%s %s\n' %(cname, cv)

View File

@ -34,8 +34,8 @@ from sets import Set
_tickmark = u'\u2713'
_crossmark = u'\u2717'
_success_sym = _tickmark
_error_sym = _crossmark
_success_sym = ''
_error_sym = '(x)'
class ifupdownMain(ifupdownBase):
""" ifupdown2 main class """