[gnome-music/wip/mschraal/glib-logging: 34/43] grltrackerplaylists: New logger
- From: Marinus Schraal <mschraal src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music/wip/mschraal/glib-logging: 34/43] grltrackerplaylists: New logger
- Date: Sat, 1 Feb 2020 15:47:31 +0000 (UTC)
commit 56ab5b4fb2902758be472e85fac1a620b428ddf1
Author: Marinus Schraal <mschraal gnome org>
Date: Sat Feb 1 15:12:52 2020 +0100
grltrackerplaylists: New logger
gnomemusic/grilowrappers/grltrackerplaylists.py | 14 +-------------
1 file changed, 1 insertion(+), 13 deletions(-)
---
diff --git a/gnomemusic/grilowrappers/grltrackerplaylists.py b/gnomemusic/grilowrappers/grltrackerplaylists.py
index a45ef924..ecd46d1c 100644
--- a/gnomemusic/grilowrappers/grltrackerplaylists.py
+++ b/gnomemusic/grilowrappers/grltrackerplaylists.py
@@ -22,7 +22,6 @@
# code, but you are not obligated to do so. If you do not wish to do so,
# delete this exception statement from your version.
-import logging
import time
from gettext import gettext as _
@@ -35,8 +34,6 @@ from gnomemusic.coresong import CoreSong
from gnomemusic.trackerwrapper import TrackerWrapper
import gnomemusic.utils as utils
-logger = logging.getLogger(__name__)
-
class GrlTrackerPlaylists(GObject.GObject):
@@ -58,9 +55,6 @@ class GrlTrackerPlaylists(GObject.GObject):
Grl.METADATA_KEY_URL
]
- def __repr__(self):
- return "<GrlTrackerPlaylists>"
-
def __init__(
self, source, coremodel, application, grilo, tracker_wrapper):
"""Initialize GrlTrackerPlaylists.
@@ -296,9 +290,6 @@ class Playlist(GObject.GObject):
query = GObject.Property(type=str, default=None)
tag_text = GObject.Property(type=str, default=None)
- def __repr__(self):
- return "<Playlist>"
-
def __init__(
self, media=None, query=None, tag_text=None, source=None,
coremodel=None, application=None, grilo=None, tracker=None):
@@ -436,7 +427,7 @@ class Playlist(GObject.GObject):
try:
conn.update_finish(res)
except GLib.Error as e:
- logger.warning(
+ self._log.warning(
"Unable to rename playlist from {} to {}: {}".format(
self._title, new_name, e.message))
else:
@@ -701,9 +692,6 @@ class Playlist(GObject.GObject):
class SmartPlaylist(Playlist):
"""Base class for smart playlists"""
- def __repr__(self):
- return "<SmartPlaylist>"
-
def __init__(self, **args):
super().__init__(**args)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]