From 34e772f2297c2bdec3033190534d36ba698c0885 Mon Sep 17 00:00:00 2001 From: Denis Fomin Date: Mon, 28 Jan 2013 16:54:29 +0400 Subject: [PATCH] update HamsterIntegrationPlugin to py3 --- hamster/__init__.py | 2 +- hamster/hamster.py | 8 ++++---- hamster/manifest.ini | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/hamster/__init__.py b/hamster/__init__.py index 42f5779..4f3a07d 100644 --- a/hamster/__init__.py +++ b/hamster/__init__.py @@ -1 +1 @@ -from hamster import HamsterIntegrationPlugin +from .hamster import HamsterIntegrationPlugin diff --git a/hamster/hamster.py b/hamster/hamster.py index 6e736ef..1920d52 100644 --- a/hamster/hamster.py +++ b/hamster/hamster.py @@ -2,7 +2,7 @@ import dbus import datetime as dt -import gobject +from gi.repository import GObject from common import gajim from common import ged from common import dbus_support @@ -13,7 +13,7 @@ from common.pep import ACTIVITIES HAMSTAER_INTERFACE = 'org.gnome.Hamster' SUBACTIVITIES = [] -subactivity_ = [ACTIVITIES[x].keys() for x in ACTIVITIES.keys()] +subactivity_ = [list(ACTIVITIES[x].keys()) for x in list(ACTIVITIES.keys())] for x in subactivity_ : SUBACTIVITIES = SUBACTIVITIES + x SUBACTIVITIES = set(SUBACTIVITIES) @@ -65,7 +65,7 @@ class HamsterIntegrationPlugin(GajimPlugin): if not facts: return if self.from_dbus_fact(facts[-1])['end_time']: - accounts = gajim.connections.keys() + accounts = list(gajim.connections.keys()) for account in accounts: if gajim.account_is_connected(account): connection = gajim.connections[account] @@ -106,4 +106,4 @@ class HamsterIntegrationPlugin(GajimPlugin): id = fact[0]) def on_signed_in(self, network_event): - gobject.timeout_add(5000,self.hamster_facts_changed) + GObject.timeout_add(5000,self.hamster_facts_changed) diff --git a/hamster/manifest.ini b/hamster/manifest.ini index 99c0fe3..d5bc30c 100644 --- a/hamster/manifest.ini +++ b/hamster/manifest.ini @@ -7,4 +7,4 @@ description: Integration with project hamster and http://projecthamster.wordpress.com/about/ authors: Denis Fomin homepage: http://trac-plugins.gajim.org/wiki/ -max_gajim_version: 0.15.9 +min_gajim_version: 0.15.10