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:
@@ -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):
|
||||||
|
|||||||
Reference in New Issue
Block a user