Commit 3f6bfedb authored by Cédric Bellegarde's avatar Cédric Bellegarde

Add new Logger class thanks to Bilal Elmoussaoui

parent 6fb5fdea
......@@ -43,6 +43,7 @@ from eolie.helper_dbus import DBusHelper
from eolie.helper_task import TaskHelper
from eolie.define import EOLIE_DATA_PATH, TimeSpan, TimeSpanValues, LoadingType
from eolie.utils import is_unity, wanted_loading_type, set_proxy_from_gnome
from eolie.logger import Logger
class Application(Gtk.Application):
......@@ -149,10 +150,6 @@ class Application(Gtk.Application):
shortcuts_action.connect("activate", self.__on_shortcuts_activate)
self.add_action(shortcuts_action)
# help_action = Gio.SimpleAction.new('help', None)
# help_action.connect('activate', self.__on_help_activate)
# self.add_action(help_action)
quit_action = Gio.SimpleAction.new("quit", None)
quit_action.connect("activate", lambda x, y: self.quit())
self.add_action(quit_action)
......@@ -244,7 +241,7 @@ class Application(Gtk.Application):
None)
self.__profiles = PROFILES
except Exception as e:
print("Application::set_profiles():", e)
Logger.error("Application::set_profiles(): %s", e)
def quit(self, vacuum=False):
"""
......@@ -410,7 +407,7 @@ class Application(Gtk.Application):
# Check MOZ_PLUGIN_PATH
if self.settings.get_value('enable-plugins') and\
not GLib.getenv("MOZ_PLUGIN_PATH"):
print("You need to set MOZ_PLUGIN_PATH to use plugins")
Logger.info("You need to set MOZ_PLUGIN_PATH to use plugins")
# https://wiki.ubuntu.com/Unity/LauncherAPI
self.__unity = None
......@@ -505,7 +502,7 @@ class Application(Gtk.Application):
sql.execute("VACUUM")
sql.isolation_level = ""
except Exception as e:
print("Application::__vacuum(): ", e)
Logger.error("Application::__vacuum(): %s ", e)
self.art.vacuum()
def __get_state(self, window):
......@@ -560,7 +557,7 @@ class Application(Gtk.Application):
dump(window_states,
open(EOLIE_DATA_PATH + "/session_states.bin", "wb"))
except Exception as e:
print("Application::__save_state()", e)
Logger.error("Application::__save_state(): %s", e)
def __clean_state_cache(self, window_id):
"""
......@@ -602,7 +599,7 @@ class Application(Gtk.Application):
size = windows[0]["size"]
maximized = windows[0]["maximized"]
except Exception as e:
print("Application::__create_initial_windows()", e)
Logger.error("Application::__create_initial_windows(): %s", e)
if not self.get_windows():
self.get_new_window(size, maximized)
......@@ -613,7 +610,7 @@ class Application(Gtk.Application):
@param options as GLib.VariantDict
"""
if options.contains("version"):
print("Eolie %s" % self.__version)
Logger.info("Eolie %s", self.__version)
return 0
return -1
......@@ -737,7 +734,7 @@ class Application(Gtk.Application):
self.__close_window(window)
except Exception as e:
self.__close_window(window)
print("Application::__on_forms_filled():", e)
Logger.error("Application::__on_forms_filled(): %s", e)
def __on_get_plugins(self, source, result, data):
"""
......@@ -748,9 +745,10 @@ class Application(Gtk.Application):
"""
plugins = source.get_plugins_finish(result)
for plugin in plugins:
print(plugin.get_name(),
plugin.get_description(),
plugin.get_path())
Logger.info("%s, %s, %s",
plugin.get_name(),
plugin.get_description(),
plugin.get_path())
def __on_delete_event(self, window, event):
"""
......@@ -825,17 +823,6 @@ class Application(Gtk.Application):
shortcuts.set_transient_for(window)
shortcuts.show()
def __on_help_activate(self, action, param):
"""
Show help in yelp
@param action as Gio.SimpleAction
@param param as GLib.Variant
"""
try:
Gtk.show_uri(None, "help:eolie", Gtk.get_current_event_time())
except:
print(_("Eolie: You need to install yelp."))
def __on_about_activate_response(self, dialog, response_id):
"""
Destroy about dialog when closed
......
......@@ -18,6 +18,7 @@ from urllib.parse import urlparse
from eolie.define import EOLIE_CACHE_PATH
from eolie.utils import remove_www
from eolie.logger import Logger
class Art:
......@@ -54,7 +55,7 @@ class Art:
surface.get_height())
pixbuf.savev(filepath, "png", [None], [None])
except Exception as e:
print("Art::save_artwork():", e)
Logger.error("Art::save_artwork(): %s", e)
def get_artwork(self, uri, suffix, scale_factor, width, heigth):
"""
......@@ -168,7 +169,7 @@ class Art:
if current_time - mtime > 2592000:
f.delete()
except Exception as e:
print("Art::vacuum():", e)
Logger.error("Art::vacuum(): %s", e)
@property
def base_uri(self):
......@@ -193,4 +194,4 @@ class Art:
try:
GLib.mkdir_with_parents(EOLIE_CACHE_PATH, 0o0750)
except Exception as e:
print("Art::__create_cache():", e)
Logger.error("Art::__create_cache(): %s", e)
......@@ -23,7 +23,8 @@ from threading import Lock
from eolie.helper_task import TaskHelper
from eolie.sqlcursor import SqlCursor
from eolie.define import EOLIE_DATA_PATH, ADBLOCK_JS
from eolie.utils import debug, remove_www
from eolie.utils import remove_www
from eolie.logger import Logger
class DatabaseAdblock:
......@@ -189,7 +190,7 @@ class DatabaseAdblock:
sql.execute("PRAGMA schema_version=%s" %
self.__SCHEMA_VERSION)
except Exception as e:
print("DatabaseAdblock::__init__(): %s" % e)
Logger.error("DatabaseAdblock::__init__(): %s", e)
def update(self):
"""
......@@ -200,7 +201,7 @@ class DatabaseAdblock:
# Update adblock_js repo
git = GLib.find_program_in_path("git")
if git is None:
print(_("For stronger ad blocking, install git command"))
Logger.info(_("For stronger ad blocking, install git command"))
else:
if GLib.file_test(ADBLOCK_JS, GLib.FileTest.IS_DIR):
argv = [git,
......@@ -294,7 +295,7 @@ class DatabaseAdblock:
v = result.fetchone()
return v is not None
except Exception as e:
print("DatabaseAdblock::is_netloc_blocked():", e)
Logger.error("DatabaseAdblock::is_netloc_blocked(): %s", e)
return False
def is_uri_blocked(self, uri, netloc):
......@@ -362,7 +363,7 @@ class DatabaseAdblock:
c = sqlite3.connect(self.__DB_PATH, 600.0)
return c
except Exception as e:
print(e)
Logger.error("DatabaseAdblock::get_cursor(): %s", e)
exit(-1)
#######################
......@@ -464,7 +465,7 @@ class DatabaseAdblock:
rule = re.sub("(\|)[^$]", r"\|", rule)
return rule
except Exception as e:
print("DatabaseAdblock::__rule_to_regex()", e)
Logger.error("DatabaseAdblock::__rule_to_regex(): %s", e)
return None
def __save_rules(self, rules):
......@@ -490,7 +491,7 @@ class DatabaseAdblock:
' ', '').replace('\r', '').split('#')[0]
# Update entry if exists, create else
if netloc != "localhost":
debug("Add filter: %s" % netloc)
Logger.debug("Add filter: %s", netloc)
self.__add_netloc(netloc)
count += 1
if count == 1000:
......@@ -623,7 +624,7 @@ class DatabaseAdblock:
self.__save_abp_rule(line[2:], True)
else:
self.__save_abp_rule(line, False)
debug("Add abp filter: %s" % line)
Logger.debug("Add abp filter: %s", line)
count += 1
if count == 1000:
SqlCursor.commit(self)
......@@ -669,7 +670,7 @@ class DatabaseAdblock:
@param content as bytes
@param uris as [str]
"""
debug("DatabaseAdblock::__on_load_uri_content(): %s" % uri)
Logger.debug("DatabaseAdblock::__on_load_uri_content(): %s", uri)
if status:
if uri in self.__URIS:
self.__task_helper.run(self.__save_rules, content,
......
......@@ -21,6 +21,7 @@ from eolie.utils import noaccents, get_random_string
from eolie.define import EOLIE_DATA_PATH
from eolie.localized import LocalizedCollation
from eolie.sqlcursor import SqlCursor
from eolie.logger import Logger
class DatabaseBookmarks:
......@@ -75,7 +76,7 @@ class DatabaseBookmarks:
sql.execute(self.__create_bookmarks_tags)
sql.execute(self.__create_parents)
except Exception as e:
print("DatabaseBookmarks::__init__(): %s" % e)
Logger.error("DatabaseBookmarks::__init__(): %s", e)
def add(self, title, uri, guid, tags, atime=0):
"""
......@@ -768,7 +769,7 @@ class DatabaseBookmarks:
position += 1
SqlCursor.remove(self)
except Exception as e:
print("DatabaseBookmarks::import_html:", e)
Logger.error("DatabaseBookmarks::import_html(): %s", e)
def import_chromium(self, chrome):
"""
......@@ -824,7 +825,7 @@ class DatabaseBookmarks:
position += 1
SqlCursor.remove(self)
except Exception as e:
print("DatabaseBookmarks::import_chromium:", e)
Logger.error("DatabaseBookmarks::import_chromium(): %s", e)
def import_firefox(self):
"""
......@@ -891,7 +892,7 @@ class DatabaseBookmarks:
self.set_position(bookmark_id, position, False)
SqlCursor.remove(self)
except Exception as e:
print("DatabaseBookmarks::import_firefox:", e)
Logger.error("DatabaseBookmarks::import_firefox(): %s", e)
def exists_guid(self, guid):
"""
......@@ -992,7 +993,8 @@ class DatabaseBookmarks:
c.create_collation('LOCALIZED', LocalizedCollation())
c.create_function("noaccents", 1, noaccents)
return c
except:
except Exception as e:
Logger.error("DatabaseBookmarks::get_cursor(): %s", e)
exit(-1)
#######################
......
......@@ -18,6 +18,7 @@ from threading import Lock
from eolie.sqlcursor import SqlCursor
from eolie.define import EOLIE_DATA_PATH
from eolie.logger import Logger
class DatabaseExceptions:
......@@ -52,7 +53,7 @@ class DatabaseExceptions:
with SqlCursor(self) as sql:
sql.execute(self.__create_exceptions)
except Exception as e:
print("DatabaseExceptions::__init__(): %s" % e)
Logger.error("DatabaseExceptions::__init__(): %s", e)
def add_exception(self, value, domain=""):
"""
......@@ -126,5 +127,5 @@ class DatabaseExceptions:
c = sqlite3.connect(self.__DB_PATH, 600.0)
return c
except Exception as e:
print(e)
Logger.error("DatabaseExceptions::get_cursor(): %s", e)
exit(-1)
......@@ -21,6 +21,7 @@ from eolie.utils import noaccents, get_random_string
from eolie.define import EOLIE_DATA_PATH
from eolie.localized import LocalizedCollation
from eolie.sqlcursor import SqlCursor
from eolie.logger import Logger
class DatabaseHistory:
......@@ -73,7 +74,7 @@ class DatabaseHistory:
sql.execute(self.__create_history_atime)
sql.execute("PRAGMA user_version=%s" % new_version)
except Exception as e:
print("DatabaseHistory::__init__(): %s" % e)
Logger.error("DatabaseHistory::__init__(): %s", e)
# DB upgrade, TODO Make it generic between class
version = 0
with SqlCursor(self) as sql:
......@@ -86,7 +87,7 @@ class DatabaseHistory:
try:
sql.execute(self.__UPGRADES[i])
except:
print("History DB upgrade %s failed" % i)
Logger.error("History DB upgrade %s failed", i)
sql.execute("PRAGMA user_version=%s" % new_version)
def add(self, title, uri, mtime, guid=None, atimes=[]):
......@@ -571,7 +572,8 @@ class DatabaseHistory:
c.create_collation('LOCALIZED', LocalizedCollation())
c.create_function("noaccents", 1, noaccents)
return c
except:
except Exception as e:
Logger.error("DatabaseHistory::get_cursor(): %s", e)
exit(-1)
#######################
......
......@@ -20,6 +20,7 @@ from threading import Lock
from eolie.helper_task import TaskHelper
from eolie.sqlcursor import SqlCursor
from eolie.define import EOLIE_DATA_PATH
from eolie.logger import Logger
class DatabasePhishing:
......@@ -55,7 +56,7 @@ class DatabasePhishing:
with SqlCursor(self) as sql:
sql.execute(self.__create_phishing)
except Exception as e:
print("DatabasePhishing::__init__(): %s" % e)
Logger.error("DatabasePhishing::__init__(): %s", e)
def update(self):
"""
......@@ -92,7 +93,7 @@ class DatabasePhishing:
v = result.fetchone()
return v is not None
except Exception as e:
print("DatabasePhishing::is_phishing():", e)
Logger.error("DatabasePhishing::is_phishing(): %s", e)
return False
def stop(self):
......@@ -110,7 +111,7 @@ class DatabasePhishing:
c = sqlite3.connect(self.DB_PATH, 600.0)
return c
except Exception as e:
print(e)
Logger.error("DatabasePhishing::get_cursor(): %s", e)
exit(-1)
#######################
......
......@@ -18,6 +18,7 @@ from threading import Lock
from eolie.sqlcursor import SqlCursor
from eolie.define import EOLIE_DATA_PATH
from eolie.logger import Logger
class DatabaseSettings:
......@@ -62,7 +63,7 @@ class DatabaseSettings:
sql.execute(self.__create_settings)
sql.execute("PRAGMA user_version=%s" % new_version)
except Exception as e:
print("DatabaseSettings::__init__(): %s" % e)
Logger.error("DatabaseSettings::__init__(): %s", e)
# DB upgrade, TODO Make it generic between class
version = 0
with SqlCursor(self) as sql:
......@@ -75,7 +76,7 @@ class DatabaseSettings:
try:
sql.execute(self.__UPGRADES[i])
except:
print("Settings DB upgrade %s failed" % i)
Logger.error("Settings DB upgrade %s failed", i)
sql.execute("PRAGMA user_version=%s" % new_version)
def set_chooser_uri(self, chooseruri, uri):
......@@ -102,7 +103,7 @@ class DatabaseSettings:
VALUES (?, ?)", (parsed.netloc,
chooseruri))
except Exception as e:
print("DatabaseSettings::set_chooser_uri():", e)
Logger.error("DatabaseSettings::set_chooser_uri(): %s", e)
def get_chooser_uri(self, uri):
"""
......@@ -142,7 +143,7 @@ class DatabaseSettings:
(uri, geolocation)\
VALUES (?, ?)", (b, parsed.netloc))
except Exception as e:
print("DatabaseSettings::allow_geolocation():", e)
Logger.error("DatabaseSettings::allow_geolocation(): %s", e)
def allowed_geolocation(self, uri):
"""
......@@ -183,7 +184,7 @@ class DatabaseSettings:
VALUES (?, ?)", (parsed.netloc,
accept))
except Exception as e:
print("DatabaseSettings::set_accept_tls():", e)
Logger.error("DatabaseSettings::set_accept_tls(): %s", e)
def get_accept_tls(self, uri):
"""
......@@ -224,7 +225,7 @@ class DatabaseSettings:
VALUES (?, ?)", (parsed.netloc,
zoom))
except Exception as e:
print("DatabaseSettings::set_zoom():", e)
Logger.error("DatabaseSettings::set_zoom(): %s", e)
def get_zoom(self, uri):
"""
......@@ -265,7 +266,7 @@ class DatabaseSettings:
VALUES (?, ?)", (parsed.netloc,
user_agent))
except Exception as e:
print("DatabaseSettings::set_user_agent():", e)
Logger.error("DatabaseSettings::set_user_agent(): %s", e)
def get_user_agent(self, uri):
"""
......@@ -306,7 +307,7 @@ class DatabaseSettings:
VALUES (?, ?)", (parsed.netloc,
profile))
except Exception as e:
print("DatabaseSettings::set_profile():", e)
Logger.error("DatabaseSettings::set_profile(): %s", e)
def get_profile(self, uri):
"""
......@@ -378,7 +379,7 @@ class DatabaseSettings:
VALUES (?, ?)", (parsed.netloc,
code))
except Exception as e:
print("DatabaseSettings::add_language():", e)
Logger.error("DatabaseSettings::add_language(): %s", e)
def remove_language(self, code, uri):
"""
......@@ -404,5 +405,5 @@ class DatabaseSettings:
c = sqlite3.connect(self.__DB_PATH, 600.0)
return c
except Exception as e:
print(e)
Logger.error("DatabaseSettings::get_cursor(): %s", e)
exit(-1)
......@@ -15,6 +15,7 @@ from gi.repository import Gtk, GLib, WebKit2
from gettext import gettext as _
from eolie.define import TimeSpanValues
from eolie.logger import Logger
class ClearDataDialog:
......@@ -313,4 +314,4 @@ class ClearDataDialog:
items = data_manager.fetch_finish(result)
self.__add_items(items)
except Exception as e:
print("ClearDataDialog::__on_data_manager_fetch():", e)
Logger.error("ClearDataDialog::__on_data_manager_fetch(): %s", e)
......@@ -16,6 +16,7 @@ import json
import sqlite3
from eolie.define import App, EOLIE_DATA_PATH, COOKIES_PATH
from eolie.logger import Logger
class Profile(GObject.GObject):
......@@ -238,7 +239,7 @@ class CookiesDialog:
sql.execute(request, filters)
sql.commit()
except Exception as e:
print("CookiesDialog::_on_dialog_response():", e)
Logger.error("CookiesDialog::_on_dialog_response(): %s", e)
App().set_profiles()
def _on_entry_changed(self, entry):
......@@ -286,7 +287,8 @@ class CookiesDialog:
if f.query_exists():
f.trash()
except Exception as e:
print("DialogSearchEngine::_on_remove_button_clicked():", e)
Logger.error("""DialogSearchEngine::
_on_remove_button_clicked(): %s""", e)
row.destroy()
for child in self.__cookies.get_children():
GLib.idle_add(child.destroy)
......@@ -331,7 +333,8 @@ class CookiesDialog:
FROM moz_cookies")
self.__add_cookies(list(result))
except Exception as e:
print("DialogCookies::_on_profile_selected():", e)
Logger.error("""DialogCookies::
_on_profile_selected(): %s""", e)
#######################
# PRIVATE #
......@@ -388,7 +391,7 @@ class CookiesDialog:
try:
self.__add_profiles(App().profiles)
except Exception as e:
print("DialogSearchEngine::__populate():", e)
Logger.error("DialogSearchEngine::__populate(): %s", e)
def __get_index(self, name):
"""
......
......@@ -15,6 +15,7 @@ from gi.repository import Gtk
from gettext import gettext as _
from eolie.define import App
from eolie.logger import Logger
class ImportBookmarksDialog:
......@@ -46,7 +47,7 @@ class ImportBookmarksDialog:
BeautifulSoup
items.append(_("Others"))
except Exception as e:
print("ImportBookmarksDialog::__init__():", e)
Logger.error("ImportBookmarksDialog::__init__(): %s", e)
for item in items:
label = Gtk.Label.new(item)
label.show()
......
......@@ -17,6 +17,7 @@ from urllib.parse import urlparse
from eolie.search import Search
from eolie.define import App
from eolie.logger import Logger
class Item(GObject.GObject):
......@@ -309,4 +310,4 @@ class SearchEngineDialog:
child.show()
self.__listbox.add(child)
except Exception as e:
print("DialogSearchEngine::__populate():", e)
Logger.error("DialogSearchEngine::__populate(): %s", e)
......@@ -15,6 +15,7 @@ from gi.repository import GObject, GLib, Gio, Gtk
from time import time
from eolie.define import App
from eolie.logger import Logger
class DownloadManager(GObject.GObject):
......@@ -165,4 +166,4 @@ class DownloadManager(GObject.GObject):
@param download as WebKit2.Download
@param error as GLib.Error
"""
print("DownloadManager::__on_failed:", error)
Logger.error("DownloadManager::__on_failed: %s", error)
......@@ -16,6 +16,7 @@ from urllib.parse import urlparse
from eolie.define import Type
from eolie.helper_passwords import PasswordsHelper
from eolie.logger import Logger
class FormsExtension(GObject.Object):
......@@ -89,7 +90,7 @@ class FormsExtension(GObject.Object):
form["username"].set_value(attributes["login"])
form["password"].set_value(password)
except Exception as e:
print("FormsExtension::set_input_forms()", e)
Logger.error("FormsExtension::set_input_forms(): %s", e)
def get_elements(self, elements):
"""
......@@ -157,7 +158,7 @@ class FormsExtension(GObject.Object):
hostname_uri,
self.__page_id)
except Exception as e:
print("FormsExtension::on_form_submit():", e)
Logger.error("FormsExtension::on_form_submit(): %s", e)
def get_hostname_uri(self, page):
"""
......@@ -258,7 +259,7 @@ class FormsExtension(GObject.Object):
args))
self.emit("submit-form", variant)
except Exception as e:
print("FormsExtension::__on_get_password()", e)
Logger.error("FormsExtension::__on_get_password(): %s", e)
def __on_page_created(self, extension, webpage):
"""
......
......@@ -19,6 +19,7 @@ from uuid import uuid4
from eolie.define import PROXY_BUS, PROXY_PATH, Type
from eolie.list import LinkedList
from eolie.helper_passwords import PasswordsHelper
from eolie.logger import Logger
class Server:
......@@ -236,7 +237,7 @@ class ProxyExtensionServer(Server):
uuid,
None)
except Exception as e:
print("ProxyExtension::SaveCredentials():", e)
Logger.error("ProxyExtension::SaveCredentials(): %s", e)
def SetAuthForms(self, userform, username):
"""
......@@ -260,7 +261,7 @@ class ProxyExtensionServer(Server):
username)
return
except Exception as e:
print("ProxyExtension::SetAuthForms():", e)
Logger.error("ProxyExtension::SetAuthForms(): %s", e)
def GetScripts(self):
"""
......@@ -270,7 +271,7 @@ class ProxyExtensionServer(Server):
try:
return self.__jsblock_extension.scripts
except Exception as e:
print("ProxyExtension::GetScripts():", e)
Logger.error("ProxyExtension::GetScripts(): %s", e)
return []
def GetImages(self):
......@@ -290,7 +291,7 @@ class ProxyExtensionServer(Server):
uris.append(uri)
return uris
except Exception as e:
print("ProxyExtension::GetImages():", e)
Logger.error("ProxyExtension::GetImages(): %s", e)
return []
def GetVideos(self):
......@@ -340,7 +341,7 @@ class ProxyExtensionServer(Server):
uris.append(uri)
return uris
except Exception as e:
print("ProxyExtension::GetImagesLinks():", e)
Logger.error("ProxyExtension::GetImagesLinks(): %s", e)
return []
def GetSelection(self):
......@@ -390,7 +391,7 @@ class ProxyExtensionServer(Server):
self.__elements_history[self.__focused] = current
self.__focused.set_value("")
except Exception as e:
print("ProxyExtension::SetPreviousForm():", e)
Logger.error("ProxyExtension::SetPreviousForm(): %s", e)
def SetNextElementValue(self):
"""
......@@ -405,7 +406,7 @@ class ProxyExtensionServer(Server):
self.__elements_history[self.__focused] = current.next
self.__focused.set_value(current.next.value)
except Exception as e:
print("ProxyExtension::SetNextForm():", e)
Logger.error("ProxyExtension::SetNextForm(): %s", e)
#######################
# PRIVATE #
......
......@@ -13,6 +13,7 @@
from gi.repository import Gio
from eolie.define import PROXY_BUS, PROXY_PATH, PROXY_INTERFACE, App
from eolie.logger import Logger
class DBusHelper:
......@@ -41,7 +42,7 @@ class DBusHelper:
self.__on_get_proxy,
call, dbus_args, callback, *args)
except Exception as e:
print("DBusHelper::call():", e)
Logger.error("DBusHelper::call(): %s", e)
def connect(self, signal, callback, page_id):
"""
......@@ -59,7 +60,7 @@ class DBusHelper:
callback)
self.__signals[page_id] = (bus, subscribe_id)
except Exception as e:
print("DBusHelper::connect():", e)
Logger.error("DBusHelper::connect(): %s", e)
def disconnect(self, page_id):
"""
......@@ -88,5 +89,5 @@ class DBusHelper:
proxy.call(call, dbus_args, Gio.DBusCallFlags.NO_AUTO_START,
1000, None, callback, *args)
except Exception as e:
print("DBusHelper::__on_get_proxy():", e)
Logger.error("DBusHelper::__on_get_proxy(): %s", e)
callback(None, None, *args)
......@@ -14,7 +14,7 @@ import gi
gi.require_version('Secret', '1')
from gi.repository import Secret, GLib
from eolie.utils import debug
from eolie.logger import Logger
class PasswordsHelper:
......@@ -55,7 +55,7 @@ class PasswordsHelper:
callback,
*args)
except Exception as e:
debug("PasswordsHelper::get_all(): %s" % e)
Logger.debug("PasswordsHelper::get_all(): %s", e)
def get(self, form_uri, userform, passform, callback, *args):
"""
......@@ -94,7 +94,7 @@ class PasswordsHelper:
callback,
*args)
except Exception as e:
debug("PasswordsHelper::get(): %s" % e)
Logger.debug("PasswordsHelper::get(): %s", e)
def get_sync(self, callback, *args):
"""
......@@ -120,7 +120,7 @@ class PasswordsHelper:
callback,
*args)
except Exception as e:
debug(