diff options
author | Sascha 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) |
commit | 526d0e1c5607605b83b09741d55a79c57a5e2437 (patch) | |
tree | b4d7906336bd5815e1b4a0174c12a0167d54b6df /extensions | |
parent | 90a84c3a6d754e1531af1493d55ed928d4c37202 (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 'extensions')
-rw-r--r-- | extensions/cpsection/aboutcomputer/model.py | 10 | ||||
-rw-r--r-- | extensions/cpsection/aboutcomputer/view.py | 24 | ||||
-rw-r--r-- | extensions/cpsection/aboutme/model.py | 18 | ||||
-rw-r--r-- | extensions/cpsection/aboutme/view.py | 18 | ||||
-rw-r--r-- | extensions/cpsection/datetime/model.py | 2 | ||||
-rw-r--r-- | extensions/cpsection/datetime/view.py | 4 | ||||
-rw-r--r-- | extensions/cpsection/frame/model.py | 4 | ||||
-rw-r--r-- | extensions/cpsection/language/model.py | 14 | ||||
-rw-r--r-- | extensions/cpsection/modemconfiguration/view.py | 9 | ||||
-rw-r--r-- | extensions/cpsection/network/model.py | 4 | ||||
-rw-r--r-- | extensions/cpsection/network/view.py | 8 | ||||
-rw-r--r-- | extensions/cpsection/power/model.py | 12 | ||||
-rw-r--r-- | extensions/deviceicon/network.py | 24 | ||||
-rw-r--r-- | extensions/deviceicon/speaker.py | 8 | ||||
-rw-r--r-- | extensions/globalkey/screenshot.py | 2 |
15 files changed, 80 insertions, 81 deletions
diff --git a/extensions/cpsection/aboutcomputer/model.py b/extensions/cpsection/aboutcomputer/model.py index b700a6b..e3b9687 100644 --- a/extensions/cpsection/aboutcomputer/model.py +++ b/extensions/cpsection/aboutcomputer/model.py @@ -84,7 +84,7 @@ def get_firmware_number(): if firmware_no is None: firmware_no = _not_available else: - firmware_no = re.split(" +", firmware_no) + firmware_no = re.split(' +', firmware_no) if len(firmware_no) == 3: firmware_no = firmware_no[1] return firmware_no @@ -96,7 +96,7 @@ def print_firmware_number(): def get_wireless_firmware(): try: - info = subprocess.Popen(["/usr/sbin/ethtool", "-i", "eth0"], + info = subprocess.Popen(['/usr/sbin/ethtool', '-i', 'eth0'], stdout=subprocess.PIPE).stdout.readlines() except OSError: return _not_available @@ -130,14 +130,14 @@ def _read_file(path): def get_license(): license_file = os.path.join(config.data_path, 'GPLv2') lang = os.environ['LANG'] - if lang.endswith("UTF-8"): + if lang.endswith('UTF-8'): lang = lang[:-6] - try_file = license_file + "." + lang + try_file = license_file + '.' + lang if os.path.isfile(try_file): license_file = try_file else: - try_file = license_file + "." + lang.split("_")[0] + try_file = license_file + '.' + lang.split('_')[0] if os.path.isfile(try_file): license_file = try_file diff --git a/extensions/cpsection/aboutcomputer/view.py b/extensions/cpsection/aboutcomputer/view.py index 68545fd..7892577 100644 --- a/extensions/cpsection/aboutcomputer/view.py +++ b/extensions/cpsection/aboutcomputer/view.py @@ -175,30 +175,30 @@ class AboutComputer(SectionView): vbox_copyright.set_border_width(style.DEFAULT_SPACING * 2) vbox_copyright.set_spacing(style.DEFAULT_SPACING) - label_copyright = gtk.Label("© 2006-2010 One Laptop per Child " - "Association Inc, Sugar Labs Inc, " - "Red Hat Inc, Collabora Ltd " - "and Contributors.") + copyright_text = '© 2006-2010 One Laptop per Child Association Inc,' \ + ' Sugar Labs Inc, Red Hat Inc, Collabora Ltd and' \ + ' Contributors.' + label_copyright = gtk.Label(copyright_text) label_copyright.set_alignment(0, 0) label_copyright.set_size_request(gtk.gdk.screen_width() / 2, -1) label_copyright.set_line_wrap(True) label_copyright.show() vbox_copyright.pack_start(label_copyright, expand=False) - label_info = gtk.Label(_("Sugar is the graphical user interface that " - "you are looking at. Sugar is free software, " - "covered by the GNU General Public License, " - "and you are welcome to change it and/or " - "distribute copies of it under certain " - "conditions described therein.")) + info_text = _('Sugar is the graphical user interface that you are' + ' looking at. Sugar is free software, covered by the' + ' GNU General Public License, and you are welcome to' + ' change it and/or distribute copies of it under' + ' certain conditions described therein.') + label_info = gtk.Label(info_text) label_info.set_alignment(0, 0) label_info.set_line_wrap(True) label_info.set_size_request(gtk.gdk.screen_width() / 2, -1) label_info.show() vbox_copyright.pack_start(label_info, expand=False) - expander = gtk.Expander(_("Full license:")) - expander.connect("notify::expanded", self.license_expander_cb) + expander = gtk.Expander(_('Full license:')) + expander.connect('notify::expanded', self.license_expander_cb) expander.show() vbox_copyright.pack_start(expander, expand=True) diff --git a/extensions/cpsection/aboutme/model.py b/extensions/cpsection/aboutme/model.py index 3bb96d5..fb4c2f1 100644 --- a/extensions/cpsection/aboutme/model.py +++ b/extensions/cpsection/aboutme/model.py @@ -33,7 +33,7 @@ _MODIFIERS = ('dark', 'medium', 'light') def get_nick(): client = gconf.client_get_default() - return client.get_string("/desktop/sugar/user/nick") + return client.get_string('/desktop/sugar/user/nick') def print_nick(): @@ -45,17 +45,17 @@ def set_nick(nick): nick : e.g. 'walter' """ if not nick: - raise ValueError(_("You must enter a name.")) + raise ValueError(_('You must enter a name.')) if not isinstance(nick, unicode): nick = unicode(nick, 'utf-8') client = gconf.client_get_default() - client.set_string("/desktop/sugar/user/nick", nick) + client.set_string('/desktop/sugar/user/nick', nick) return 1 def get_color(): client = gconf.client_get_default() - return client.get_string("/desktop/sugar/user/color") + return client.get_string('/desktop/sugar/user/color') def print_color(): @@ -91,10 +91,10 @@ def set_color(stroke, fill, stroke_modifier='medium', fill_modifier='medium'): """ if stroke_modifier not in _MODIFIERS or fill_modifier not in _MODIFIERS: - print (_("Error in specified color modifiers.")) + print (_('Error in specified color modifiers.')) return if stroke not in _COLORS or fill not in _COLORS: - print (_("Error in specified colors.")) + print (_('Error in specified colors.')) return if stroke_modifier == fill_modifier: @@ -107,13 +107,13 @@ def set_color(stroke, fill, stroke_modifier='medium', fill_modifier='medium'): + _COLORS[fill][fill_modifier] client = gconf.client_get_default() - client.set_string("/desktop/sugar/user/color", color) + client.set_string('/desktop/sugar/user/color', color) return 1 def get_color_xo(): client = gconf.client_get_default() - return client.get_string("/desktop/sugar/user/color") + return client.get_string('/desktop/sugar/user/color') def set_color_xo(color): @@ -121,5 +121,5 @@ def set_color_xo(color): This method is used by the graphical user interface """ client = gconf.client_get_default() - client.set_string("/desktop/sugar/user/color", color) + client.set_string('/desktop/sugar/user/color', color) return 1 diff --git a/extensions/cpsection/aboutme/view.py b/extensions/cpsection/aboutme/view.py index 69f212a..84daec7 100644 --- a/extensions/cpsection/aboutme/view.py +++ b/extensions/cpsection/aboutme/view.py @@ -35,12 +35,12 @@ def _get_next_stroke_color(color): as color. """ current_index = _get_current_index(color) if current_index == -1: - return "%s,%s" % (color.stroke, color.fill) + return '%s,%s' % (color.stroke, color.fill) next_index = _next_index(current_index) while(colors[next_index][_FILL_COLOR] != \ colors[current_index][_FILL_COLOR]): next_index = _next_index(next_index) - return "%s,%s" % (colors[next_index][_STROKE_COLOR], + return '%s,%s' % (colors[next_index][_STROKE_COLOR], colors[next_index][_FILL_COLOR]) @@ -49,12 +49,12 @@ def _get_previous_stroke_color(color): as color. """ current_index = _get_current_index(color) if current_index == -1: - return "%s,%s" % (color.stroke, color.fill) + return '%s,%s' % (color.stroke, color.fill) previous_index = _previous_index(current_index) while (colors[previous_index][_FILL_COLOR] != \ colors[current_index][_FILL_COLOR]): previous_index = _previous_index(previous_index) - return "%s,%s" % (colors[previous_index][_STROKE_COLOR], + return '%s,%s' % (colors[previous_index][_STROKE_COLOR], colors[previous_index][_FILL_COLOR]) @@ -63,12 +63,12 @@ def _get_next_fill_color(color): as color. """ current_index = _get_current_index(color) if current_index == -1: - return "%s,%s" % (color.stroke, color.fill) + return '%s,%s' % (color.stroke, color.fill) next_index = _next_index(current_index) while (colors[next_index][_STROKE_COLOR] != \ colors[current_index][_STROKE_COLOR]): next_index = _next_index(next_index) - return "%s,%s" % (colors[next_index][_STROKE_COLOR], + return '%s,%s' % (colors[next_index][_STROKE_COLOR], colors[next_index][_FILL_COLOR]) @@ -77,12 +77,12 @@ def _get_previous_fill_color(color): as color. """ current_index = _get_current_index(color) if current_index == -1: - return "%s,%s" % (color.stroke, color.fill) + return '%s,%s' % (color.stroke, color.fill) previous_index = _previous_index(current_index) while (colors[previous_index][_STROKE_COLOR] != \ colors[current_index][_STROKE_COLOR]): previous_index = _previous_index(previous_index) - return "%s,%s" % (colors[previous_index][_STROKE_COLOR], + return '%s,%s' % (colors[previous_index][_STROKE_COLOR], colors[previous_index][_FILL_COLOR]) @@ -112,7 +112,7 @@ _PREVIOUS_STROKE_COLOR = 4 class EventIcon(gtk.EventBox): - __gtype_name__ = "SugarEventIcon" + __gtype_name__ = 'SugarEventIcon' def __init__(self, **kwargs): gtk.EventBox.__init__(self) diff --git a/extensions/cpsection/datetime/model.py b/extensions/cpsection/datetime/model.py index dc17168..84e1259 100644 --- a/extensions/cpsection/datetime/model.py +++ b/extensions/cpsection/datetime/model.py @@ -89,7 +89,7 @@ def set_timezone(timezone): client = gconf.client_get_default() client.set_string('/desktop/sugar/date/timezone', timezone) else: - raise ValueError(_("Error timezone does not exist.")) + raise ValueError(_('Error timezone does not exist.')) return 1 # inilialize the docstrings for the timezone diff --git a/extensions/cpsection/datetime/view.py b/extensions/cpsection/datetime/view.py index ec82060..1cef78f 100644 --- a/extensions/cpsection/datetime/view.py +++ b/extensions/cpsection/datetime/view.py @@ -37,7 +37,7 @@ class TimeZone(SectionView): self.set_border_width(style.DEFAULT_SPACING * 2) self.set_spacing(style.DEFAULT_SPACING) - self.connect("realize", self.__realize_cb) + self.connect('realize', self.__realize_cb) self._entry = iconentry.IconEntry() self._entry.set_icon_from_name(iconentry.ICON_ENTRY_PRIMARY, @@ -101,7 +101,7 @@ class TimeZone(SectionView): self.needs_restart = False self._cursor_change_handler = self._treeview.connect( \ - "cursor-changed", self.__zone_changed_cd) + 'cursor-changed', self.__zone_changed_cd) def undo(self): self._treeview.disconnect(self._cursor_change_handler) diff --git a/extensions/cpsection/frame/model.py b/extensions/cpsection/frame/model.py index de2da5e..4796062 100644 --- a/extensions/cpsection/frame/model.py +++ b/extensions/cpsection/frame/model.py @@ -38,7 +38,7 @@ def set_corner_delay(delay): try: int(delay) except ValueError: - raise ValueError(_("Value must be an integer.")) + raise ValueError(_('Value must be an integer.')) client = gconf.client_get_default() client.set_int('/desktop/sugar/frame/corner_delay', int(delay)) return 0 @@ -63,7 +63,7 @@ def set_edge_delay(delay): try: int(delay) except ValueError: - raise ValueError(_("Value must be an integer.")) + raise ValueError(_('Value must be an integer.')) client = gconf.client_get_default() client.set_int('/desktop/sugar/frame/edge_delay', int(delay)) return 0 diff --git a/extensions/cpsection/language/model.py b/extensions/cpsection/language/model.py index c6f4847..48bb496 100644 --- a/extensions/cpsection/language/model.py +++ b/extensions/cpsection/language/model.py @@ -27,7 +27,7 @@ import subprocess _default_lang = '%s.%s' % locale.getdefaultlocale() -_standard_msg = _("Could not access ~/.i18n. Create standard settings.") +_standard_msg = _('Could not access ~/.i18n. Create standard settings.') def read_all_languages(): @@ -70,7 +70,7 @@ def _initialize(): def _write_i18n(langs): colon = ':' langstr = colon.join(langs) - path = os.path.join(os.environ.get("HOME"), '.i18n') + path = os.path.join(os.environ.get('HOME'), '.i18n') if not os.access(path, os.W_OK): print _standard_msg fd = open(path, 'w') @@ -85,7 +85,7 @@ def _write_i18n(langs): def get_languages(): - path = os.path.join(os.environ.get("HOME"), '.i18n') + path = os.path.join(os.environ.get('HOME', ''), '.i18n') if not os.access(path, os.R_OK): print _standard_msg fd = open(path, 'w') @@ -94,18 +94,18 @@ def get_languages(): fd.close() return [_default_lang] - fd = open(path, "r") + fd = open(path, 'r') lines = fd.readlines() fd.close() langlist = None for line in lines: - if line.startswith("LANGUAGE="): + if line.startswith('LANGUAGE='): lang = line[9:].replace('"', '') lang = lang.strip() langlist = lang.split(':') - elif line.startswith("LANG="): + elif line.startswith('LANG='): lang = line[5:].replace('"', '') # There might be cases where .i18n may not contain a LANGUAGE field @@ -128,7 +128,7 @@ def print_languages(): found_lang = True break if not found_lang: - print (_("Language for code=%s could not be determined.") % code) + print (_('Language for code=%s could not be determined.') % code) def set_languages(languages): diff --git a/extensions/cpsection/modemconfiguration/view.py b/extensions/cpsection/modemconfiguration/view.py index 11396d7..c31edba 100644 --- a/extensions/cpsection/modemconfiguration/view.py +++ b/extensions/cpsection/modemconfiguration/view.py @@ -30,7 +30,7 @@ APPLY_TIMEOUT = 1000 class EntryWithLabel(gtk.HBox): - __gtype_name__ = "SugarEntryWithLabel" + __gtype_name__ = 'SugarEntryWithLabel' def __init__(self, label_text): gtk.HBox.__init__(self, spacing=style.DEFAULT_SPACING) @@ -172,10 +172,9 @@ class ModemConfiguration(SectionView): self.set_spacing(style.DEFAULT_SPACING) self._group = gtk.SizeGroup(gtk.SIZE_GROUP_HORIZONTAL) - explanation = _("You will need to provide the following " \ - "information to set up a mobile " \ - "broadband connection to a cellular "\ - "(3G) network.") + explanation = _('You will need to provide the following information' + ' to set up a mobile broadband connection to a' + ' cellular (3G) network.') self._text = gtk.Label(explanation) self._text.set_width_chars(100) self._text.set_line_wrap(True) diff --git a/extensions/cpsection/network/model.py b/extensions/cpsection/network/model.py index c1e7229..667e476 100644 --- a/extensions/cpsection/network/model.py +++ b/extensions/cpsection/network/model.py @@ -93,7 +93,7 @@ def set_radio(state): raise ReadError('%s service not available' % _NM_SERVICE) nm_props.Set(_NM_IFACE, 'WirelessEnabled', False) else: - raise ValueError(_("Error in specified radio argument use on/off.")) + raise ValueError(_('Error in specified radio argument use on/off.')) return 0 @@ -130,7 +130,7 @@ def set_publish_information(value): try: value = (False, True)[int(value)] except: - raise ValueError(_("Error in specified argument use 0/1.")) + raise ValueError(_('Error in specified argument use 0/1.')) client = gconf.client_get_default() client.set_bool('/desktop/sugar/collaboration/publish_gadget', value) diff --git a/extensions/cpsection/network/view.py b/extensions/cpsection/network/view.py index 1c688c6..9ecc8fd 100644 --- a/extensions/cpsection/network/view.py +++ b/extensions/cpsection/network/view.py @@ -66,8 +66,8 @@ class Network(SectionView): box_wireless.set_border_width(style.DEFAULT_SPACING * 2) box_wireless.set_spacing(style.DEFAULT_SPACING) - radio_info = gtk.Label(_("Turn off the wireless radio to save " - "battery life")) + radio_info = gtk.Label(_('Turn off the wireless radio to save battery' + ' life')) radio_info.set_alignment(0, 0) radio_info.set_line_wrap(True) radio_info.show() @@ -95,8 +95,8 @@ class Network(SectionView): self._radio_alert.props.msg = self.restart_msg self._radio_alert.show() - history_info = gtk.Label(_("Discard network history if you " - "have trouble connecting to the network")) + history_info = gtk.Label(_('Discard network history if you have' + ' trouble connecting to the network')) history_info.set_alignment(0, 0) history_info.set_line_wrap(True) history_info.show() diff --git a/extensions/cpsection/power/model.py b/extensions/cpsection/power/model.py index ffbb5a2..041e5cf 100644 --- a/extensions/cpsection/power/model.py +++ b/extensions/cpsection/power/model.py @@ -81,13 +81,13 @@ def set_automatic_pm(enabled): keystore = dbus.Interface(proxy, OHM_SERVICE_IFACE) if enabled == 'on' or enabled == 1: - keystore.SetKey("suspend.automatic_pm", 1) + keystore.SetKey('suspend.automatic_pm', 1) enabled = True elif enabled == 'off' or enabled == 0: - keystore.SetKey("suspend.automatic_pm", 0) + keystore.SetKey('suspend.automatic_pm', 0) enabled = False else: - raise ValueError(_("Error in automatic pm argument, use on/off.")) + raise ValueError(_('Error in automatic pm argument, use on/off.')) client = gconf.client_get_default() client.set_bool('/desktop/sugar/power/automatic', enabled) @@ -111,13 +111,13 @@ def set_extreme_pm(enabled): keystore = dbus.Interface(proxy, OHM_SERVICE_IFACE) if enabled == 'on' or enabled == 1: - keystore.SetKey("suspend.extreme_pm", 1) + keystore.SetKey('suspend.extreme_pm', 1) enabled = True elif enabled == 'off' or enabled == 0: - keystore.SetKey("suspend.extreme_pm", 0) + keystore.SetKey('suspend.extreme_pm', 0) enabled = False else: - raise ValueError(_("Error in extreme pm argument, use on/off.")) + raise ValueError(_('Error in extreme pm argument, use on/off.')) client = gconf.client_get_default() client.set_bool('/desktop/sugar/power/extreme', enabled) diff --git a/extensions/deviceicon/network.py b/extensions/deviceicon/network.py index 417ac05..33b9eac 100644 --- a/extensions/deviceicon/network.py +++ b/extensions/deviceicon/network.py @@ -50,7 +50,7 @@ from jarabe.frame.frameinvoker import FrameWidgetInvoker from jarabe.view.pulsingicon import PulsingIcon -IP_ADDRESS_TEXT_TEMPLATE = _("IP address: %s") +IP_ADDRESS_TEXT_TEMPLATE = _('IP address: %s') _NM_SERVICE = 'org.freedesktop.NetworkManager' _NM_IFACE = 'org.freedesktop.NetworkManager' @@ -143,7 +143,7 @@ class WirelessPalette(Palette): self._set_channel(channel) def _set_channel(self, channel): - self._channel_label.set_text("%s: %d" % (_("Channel"), channel)) + self._channel_label.set_text('%s: %d' % (_('Channel'), channel)) def _set_ip_address(self, ip_address): if ip_address is not None: @@ -191,7 +191,7 @@ class WiredPalette(Palette): def _inet_ntoa(self, iaddress): address = ['%s' % ((iaddress >> i) % 256) for i in [0, 8, 16, 24]] - return ".".join(address) + return '.'.join(address) def _set_ip_address(self, ip_address): if ip_address is not None: @@ -349,8 +349,8 @@ class GsmPalette(Palette): def update_stats(self, in_bytes, out_bytes): in_KBytes = in_bytes / 1024 out_KBytes = out_bytes / 1024 - self._data_label_up.set_text(_("%d KB") % (out_KBytes)) - self._data_label_down.set_text(_("%d KB") % (in_KBytes)) + self._data_label_up.set_text(_('%d KB') % (out_KBytes)) + self._data_label_down.set_text(_('%d KB') % (in_KBytes)) def _get_error_by_nm_reason(self, reason): if reason in [network.NM_DEVICE_STATE_REASON_NO_SECRETS, @@ -392,8 +392,8 @@ class WirelessDeviceView(ToolButton): self._icon = PulsingIcon() self._icon.props.icon_name = get_icon_state('network-wireless', 0) - self._inactive_color = xocolor.XoColor( \ - "%s,%s" % (style.COLOR_BUTTON_GREY.get_svg(), + self._inactive_color = xocolor.XoColor( + '%s,%s' % (style.COLOR_BUTTON_GREY.get_svg(), style.COLOR_TRANSPARENT.get_svg())) self._icon.props.pulse_color = self._inactive_color self._icon.props.base_color = self._inactive_color @@ -513,7 +513,7 @@ class WirelessDeviceView(ToolButton): def _update(self): if self._flags == network.NM_802_11_AP_FLAGS_PRIVACY: - self._icon.props.badge_name = "emblem-locked" + self._icon.props.badge_name = 'emblem-locked' else: self._icon.props.badge_name = None @@ -606,8 +606,8 @@ class OlpcMeshDeviceView(ToolButton): self._channel = 0 self._icon = PulsingIcon(icon_name=self._ICON_NAME) - self._inactive_color = xocolor.XoColor( \ - "%s,%s" % (style.COLOR_BUTTON_GREY.get_svg(), + self._inactive_color = xocolor.XoColor( + '%s,%s' % (style.COLOR_BUTTON_GREY.get_svg(), style.COLOR_TRANSPARENT.get_svg())) self._icon.props.pulse_color = profile.get_color() self._icon.props.base_color = self._inactive_color @@ -616,7 +616,7 @@ class OlpcMeshDeviceView(ToolButton): self._icon.show() self.set_palette_invoker(FrameWidgetInvoker(self)) - self._palette = WirelessPalette(_("Mesh Network")) + self._palette = WirelessPalette(_('Mesh Network')) self._palette.connect('deactivate-connection', self.__deactivate_connection) self.set_palette(self._palette) @@ -659,7 +659,7 @@ class OlpcMeshDeviceView(ToolButton): def _update_text(self): channel = str(self._channel) - text = _("Mesh Network %s") % glib.markup_escape_text(channel) + text = _('Mesh Network %s') % glib.markup_escape_text(channel) self._palette.props.primary_text = text def _update(self): diff --git a/extensions/deviceicon/speaker.py b/extensions/deviceicon/speaker.py index 2eadf1d..b6e33d8 100644 --- a/extensions/deviceicon/speaker.py +++ b/extensions/deviceicon/speaker.py @@ -205,15 +205,15 @@ class DeviceModel(gobject.GObject): return 'speaker' def do_get_property(self, pspec): - if pspec.name == "level": + if pspec.name == 'level': return self._get_level() - elif pspec.name == "muted": + elif pspec.name == 'muted': return self._get_muted() def do_set_property(self, pspec, value): - if pspec.name == "level": + if pspec.name == 'level': self._set_level(value) - elif pspec.name == "muted": + elif pspec.name == 'muted': self._set_muted(value) diff --git a/extensions/globalkey/screenshot.py b/extensions/globalkey/screenshot.py index b62806f..b9408d4 100644 --- a/extensions/globalkey/screenshot.py +++ b/extensions/globalkey/screenshot.py @@ -46,7 +46,7 @@ def handle_key_press(key): height=height) screenshot.get_from_drawable(window, window.get_colormap(), x_orig, y_orig, 0, 0, width, height) - screenshot.save(file_path, "png") + screenshot.save(file_path, 'png') client = gconf.client_get_default() color = client.get_string('/desktop/sugar/user/color') |