1
0
mirror of https://github.com/gryf/wicd.git synced 2026-01-07 14:24:22 +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): def FormatSignalForPrinting(self, signal):
""" Returns the suffix to display after the signal strength number. """ """ Returns the suffix to display after the signal strength number. """
if self.GetSignalDisplayType() == 1: if self.GetSignalDisplayType() == 1:
return (signal + " dBm") return '%s dBm' % signal
else: else:
try: try:
if int(signal) == 101: if int(signal) == 101:
return '??%' return '??%'
else: else:
return (signal + "%") return '%s%%' % signal
except ValueError: except ValueError:
return (signal + "%") return '%s%%' % signal
@dbus.service.method('org.wicd.daemon') @dbus.service.method('org.wicd.daemon')
def SetSuspend(self, val): def SetSuspend(self, val):