1
0
mirror of https://github.com/gryf/wicd.git synced 2025-12-30 18:32:28 +01:00

Make signal formatting clearer

This commit is contained in:
David Paleino
2011-12-19 23:01:38 +01:00
parent 843da61ba3
commit 4ed7f27cc1

View File

@@ -312,15 +312,15 @@ class WicdDaemon(dbus.service.Object):
def FormatSignalForPrinting(self, signal):
""" Returns the suffix to display after the signal strength number. """
if self.GetSignalDisplayType() == 1:
return (signal + " dBm")
return '%s dBm' % signal
else:
try:
if int(signal) == 101:
return '??%'
else:
return (signal + "%")
return '%s%%' % signal
except ValueError:
return (signal + "%")
return '%s%%' % signal
@dbus.service.method('org.wicd.daemon')
def SetSuspend(self, val):