[caribou] Add some code compatibility for python3. It is seen that on Fedora Caribou rpm build failed for pyth
- From: Daiki Ueno <dueno src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [caribou] Add some code compatibility for python3. It is seen that on Fedora Caribou rpm build failed for pyth
- Date: Tue, 24 Nov 2015 07:39:55 +0000 (UTC)
commit 067cf731024fd08136a84684539f010dd9514d69
Author: Parag Nemade <pnemade redhat com>
Date: Tue Nov 24 11:50:25 2015 +0530
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.
caribou/antler/window.py | 4 ++--
caribou/settings/settings_manager.py | 5 ++---
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:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]