summaryrefslogtreecommitdiff
path: root/caribou
diff options
context:
space:
mode:
authorParag Nemade <pnemade@redhat.com>2015-11-24 11:50:25 +0530
committerDaiki Ueno <dueno@src.gnome.org>2015-11-24 16:39:22 +0900
commit067cf731024fd08136a84684539f010dd9514d69 (patch)
tree872480efb9562a849a7e3cdb7ae26fe2c0bfa455 /caribou
parent14d171f4f29330a5d00c879803701407c7f78a34 (diff)
downloadcaribou-067cf731024fd08136a84684539f010dd9514d69.tar.gz
Add some code compatibility for python3. It is seen that on Fedora Caribou rpm build failed for python3. If used 2to3 tool everything works fine, but if I remove it then build fails. I tried to find minimal changes required in code compared to what 2to3 tool is offering changes. With this attached patch build on Fedora for python3 succeeds.
Diffstat (limited to 'caribou')
-rw-r--r--caribou/antler/window.py4
-rw-r--r--caribou/settings/settings_manager.py5
2 files changed, 4 insertions, 5 deletions
diff --git a/caribou/antler/window.py b/caribou/antler/window.py
index 959b825..0061040 100644
--- a/caribou/antler/window.py
+++ b/caribou/antler/window.py
@@ -54,7 +54,7 @@ class AnimatedWindowBase(Gtk.Window, Clutter.Animatable):
elif property.name == "antler-window-y":
return self.get_position()[1]
else:
- raise AttributeError, 'unknown property %s' % property.name
+ raise AttributeError('unknown property %s' % property.name)
def do_set_property(self, property, value):
if property.name == "antler-window-x":
@@ -64,7 +64,7 @@ class AnimatedWindowBase(Gtk.Window, Clutter.Animatable):
if value is not None:
self.move(self.get_position()[0], value)
else:
- raise AttributeError, 'unknown property %s' % property.name
+ raise AttributeError('unknown property %s' % property.name)
def do_animate_property(self, animation, prop_name, initial_value,
final_value, progress, gvalue):
diff --git a/caribou/settings/settings_manager.py b/caribou/settings/settings_manager.py
index 4e9b43f..062a278 100644
--- a/caribou/settings/settings_manager.py
+++ b/caribou/settings/settings_manager.py
@@ -16,12 +16,11 @@ class SettingsManager(object):
try:
return self._settings_map[name]
except KeyError:
- raise AttributeError, "no setting named '%s'" % name
+ raise AttributeError("no setting named '%s'" % name)
def _map_settings(self, setting):
if self._settings_map.has_key(setting.name):
- raise ValueError, \
- "more than one setting has the name '%s'" % setting.name
+ raise ValueError("more than one setting has the name '%s'" % setting.name)
self._settings_map[setting.name] = setting
for s in setting: