Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/src/jarabe/model/network.py
diff options
context:
space:
mode:
authorSascha Silbe <sascha-pgp@silbe.org>2010-10-16 18:12:40 (GMT)
committer Sascha Silbe <sascha-pgp@silbe.org>2010-11-24 19:22:02 (GMT)
commit526d0e1c5607605b83b09741d55a79c57a5e2437 (patch)
treeb4d7906336bd5815e1b4a0174c12a0167d54b6df /src/jarabe/model/network.py
parent90a84c3a6d754e1531af1493d55ed928d4c37202 (diff)
style cleanup: prefer ' for strings
Tomeu prefers ' for strings, so let's use it wherever we don't have a good reason to use ". Reviewed-by: James Cameron <quozl@laptop.org> Reviewed-by: Simon Schampijer <simon@laptop.org> CC: Aleksey Lim <alsroot@member.fsf.org>
Diffstat (limited to 'src/jarabe/model/network.py')
-rw-r--r--src/jarabe/model/network.py102
1 files changed, 51 insertions, 51 deletions
diff --git a/src/jarabe/model/network.py b/src/jarabe/model/network.py
index cfb04a6..4d999da 100644
--- a/src/jarabe/model/network.py
+++ b/src/jarabe/model/network.py
@@ -155,89 +155,89 @@ def get_error_by_reason(reason):
if _nm_device_state_reason_description is None:
_nm_device_state_reason_description = {
NM_DEVICE_STATE_REASON_UNKNOWN:
- _("The reason for the device state change is unknown."),
+ _('The reason for the device state change is unknown.'),
NM_DEVICE_STATE_REASON_NONE:
- _("The state change is normal."),
+ _('The state change is normal.'),
NM_DEVICE_STATE_REASON_NOW_MANAGED:
- _("The device is now managed."),
+ _('The device is now managed.'),
NM_DEVICE_STATE_REASON_NOW_UNMANAGED:
- _("The device is no longer managed."),
+ _('The device is no longer managed.'),
NM_DEVICE_STATE_REASON_CONFIG_FAILED:
- _("The device could not be readied for configuration."),
+ _('The device could not be readied for configuration.'),
NM_DEVICE_STATE_REASON_CONFIG_UNAVAILABLE:
- _("IP configuration could not be reserved "
- "(no available address, timeout, etc)."),
+ _('IP configuration could not be reserved '
+ '(no available address, timeout, etc).'),
NM_DEVICE_STATE_REASON_CONFIG_EXPIRED:
- _("The IP configuration is no longer valid."),
+ _('The IP configuration is no longer valid.'),
NM_DEVICE_STATE_REASON_NO_SECRETS:
- _("Secrets were required, but not provided."),
+ _('Secrets were required, but not provided.'),
NM_DEVICE_STATE_REASON_SUPPLICANT_DISCONNECT:
- _("The 802.1X supplicant disconnected from "
- "the access point or authentication server."),
+ _('The 802.1X supplicant disconnected from '
+ 'the access point or authentication server.'),
NM_DEVICE_STATE_REASON_SUPPLICANT_CONFIG_FAILED:
- _("Configuration of the 802.1X supplicant failed."),
+ _('Configuration of the 802.1X supplicant failed.'),
NM_DEVICE_STATE_REASON_SUPPLICANT_FAILED:
- _("The 802.1X supplicant quit or failed unexpectedly."),
+ _('The 802.1X supplicant quit or failed unexpectedly.'),
NM_DEVICE_STATE_REASON_SUPPLICANT_TIMEOUT:
- _("The 802.1X supplicant took too long to authenticate."),
+ _('The 802.1X supplicant took too long to authenticate.'),
NM_DEVICE_STATE_REASON_PPP_START_FAILED:
- _("The PPP service failed to start within the allowed time."),
+ _('The PPP service failed to start within the allowed time.'),
NM_DEVICE_STATE_REASON_PPP_DISCONNECT:
- _("The PPP service disconnected unexpectedly."),
+ _('The PPP service disconnected unexpectedly.'),
NM_DEVICE_STATE_REASON_PPP_FAILED:
- _("The PPP service quit or failed unexpectedly."),
+ _('The PPP service quit or failed unexpectedly.'),
NM_DEVICE_STATE_REASON_DHCP_START_FAILED:
- _("The DHCP service failed to start within the allowed time."),
+ _('The DHCP service failed to start within the allowed time.'),
NM_DEVICE_STATE_REASON_DHCP_ERROR:
- _("The DHCP service reported an unexpected error."),
+ _('The DHCP service reported an unexpected error.'),
NM_DEVICE_STATE_REASON_DHCP_FAILED:
- _("The DHCP service quit or failed unexpectedly."),
+ _('The DHCP service quit or failed unexpectedly.'),
NM_DEVICE_STATE_REASON_SHARED_START_FAILED:
- _("The shared connection service failed to start."),
+ _('The shared connection service failed to start.'),
NM_DEVICE_STATE_REASON_SHARED_FAILED:
- _("The shared connection service quit or "
- "failed unexpectedly."),
+ _('The shared connection service quit or failed'
+ ' unexpectedly.'),
NM_DEVICE_STATE_REASON_AUTOIP_START_FAILED:
- _("The AutoIP service failed to start."),
+ _('The AutoIP service failed to start.'),
NM_DEVICE_STATE_REASON_AUTOIP_ERROR:
- _("The AutoIP service reported an unexpected error."),
+ _('The AutoIP service reported an unexpected error.'),
NM_DEVICE_STATE_REASON_AUTOIP_FAILED:
- _("The AutoIP service quit or failed unexpectedly."),
+ _('The AutoIP service quit or failed unexpectedly.'),
NM_DEVICE_STATE_REASON_MODEM_BUSY:
- _("Dialing failed because the line was busy."),
+ _('Dialing failed because the line was busy.'),
NM_DEVICE_STATE_REASON_MODEM_NO_DIAL_TONE:
- _("Dialing failed because there was no dial tone."),
+ _('Dialing failed because there was no dial tone.'),
NM_DEVICE_STATE_REASON_MODEM_NO_CARRIER:
- _("Dialing failed because there was no carrier."),
+ _('Dialing failed because there was no carrier.'),
NM_DEVICE_STATE_REASON_MODEM_DIAL_TIMEOUT:
- _("Dialing timed out."),
+ _('Dialing timed out.'),
NM_DEVICE_STATE_REASON_MODEM_DIAL_FAILED:
- _("Dialing failed."),
+ _('Dialing failed.'),
NM_DEVICE_STATE_REASON_MODEM_INIT_FAILED:
- _("Modem initialization failed."),
+ _('Modem initialization failed.'),
NM_DEVICE_STATE_REASON_GSM_APN_FAILED:
- _("Failed to select the specified GSM APN."),
+ _('Failed to select the specified GSM APN'),
NM_DEVICE_STATE_REASON_GSM_REGISTRATION_NOT_SEARCHING:
- _("Not searching for networks."),
+ _('Not searching for networks.'),
NM_DEVICE_STATE_REASON_GSM_REGISTRATION_DENIED:
- _("Network registration was denied."),
+ _('Network registration was denied.'),
NM_DEVICE_STATE_REASON_GSM_REGISTRATION_TIMEOUT:
- _("Network registration timed out."),
+ _('Network registration timed out.'),
NM_DEVICE_STATE_REASON_GSM_REGISTRATION_FAILED:
- _("Failed to register with the requested GSM network."),
+ _('Failed to register with the requested GSM network.'),
NM_DEVICE_STATE_REASON_GSM_PIN_CHECK_FAILED:
- _("PIN check failed."),
+ _('PIN check failed.'),
NM_DEVICE_STATE_REASON_FIRMWARE_MISSING:
- _("Necessary firmware for the device may be missing."),
+ _('Necessary firmware for the device may be missing.'),
NM_DEVICE_STATE_REASON_REMOVED:
- _("The device was removed."),
+ _('The device was removed.'),
NM_DEVICE_STATE_REASON_SLEEPING:
- _("NetworkManager went to sleep."),
+ _('NetworkManager went to sleep.'),
NM_DEVICE_STATE_REASON_CONNECTION_REMOVED:
_("The device's active connection was removed "
"or disappeared."),
NM_DEVICE_STATE_REASON_USER_REQUESTED:
- _("A user or client requested the disconnection."),
+ _('A user or client requested the disconnection.'),
NM_DEVICE_STATE_REASON_CARRIER:
_("The device's carrier/link changed.")}
@@ -259,8 +259,8 @@ def frequency_to_channel(frequency):
2452: 9, 2457: 10, 2462: 11, 2467: 12,
2472: 13}
if frequency not in ftoc:
- logging.warning("The frequency %s can not be mapped to a channel, " \
- "defaulting to channel 1.", frequency)
+ logging.warning('The frequency %s can not be mapped to a channel, '
+ 'defaulting to channel 1.', frequency)
return 1
return ftoc[frequency]
@@ -298,7 +298,7 @@ class WirelessSecurity(object):
class Wireless(object):
- nm_name = "802-11-wireless"
+ nm_name = '802-11-wireless'
def __init__(self):
self.ssid = None
@@ -321,7 +321,7 @@ class Wireless(object):
class OlpcMesh(object):
- nm_name = "802-11-olpc-mesh"
+ nm_name = '802-11-olpc-mesh'
def __init__(self, channel, anycast_addr):
self.channel = channel
@@ -329,12 +329,12 @@ class OlpcMesh(object):
def get_dict(self):
ret = {
- "ssid": dbus.ByteArray("olpc-mesh"),
- "channel": self.channel,
+ 'ssid': dbus.ByteArray('olpc-mesh'),
+ 'channel': self.channel,
}
if self.anycast_addr:
- ret["dhcp-anycast-address"] = dbus.ByteArray(self.anycast_addr)
+ ret['dhcp-anycast-address'] = dbus.ByteArray(self.anycast_addr)
return ret
@@ -737,7 +737,7 @@ class AccessPoint(gobject.GObject):
else:
fl |= 1 << 6
- hashstr = str(fl) + "@" + self.name
+ hashstr = str(fl) + '@' + self.name
return hash(hashstr)
def _update_properties(self, properties):
@@ -915,7 +915,7 @@ def load_gsm_connection():
except Exception:
logging.exception('Error adding gsm connection to NMSettings.')
else:
- logging.exception("No gsm connection was set in GConf.")
+ logging.exception('No gsm connection was set in GConf.')
def load_connections():