After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 786541 - Missing loggers from 2 view modules.
Missing loggers from 2 view modules.
Status: RESOLVED FIXED
Product: gnome-music
Classification: Applications
Component: general
3.25.x
Other Linux
: Normal normal
: ---
Assigned To: gnome-music-maint
gnome-music-maint
Depends on:
Blocks:
 
 
Reported: 2017-08-20 14:14 UTC by Jordan Petridis
Modified: 2017-08-21 21:59 UTC
See Also:
GNOME target: ---
GNOME version: 3.25/3.26


Attachments
Imports logging and Initiates a logger object for each module. (2.60 KB, patch)
2017-08-20 14:14 UTC, Jordan Petridis
none Details | Review
Removed extra blank line, redid the commit message. (2.08 KB, patch)
2017-08-20 15:08 UTC, Jordan Petridis
none Details | Review
Short and to the point I hope (1.80 KB, patch)
2017-08-21 07:33 UTC, Jordan Petridis
committed Details | Review

Description Jordan Petridis 2017-08-20 14:14:02 UTC
Created attachment 358016 [details] [review]
Imports logging and Initiates a logger object for each module.

There were logger objects on files artistview.py and songsview.py without a logger instance.
If they were ever called they probably crashed the whole program.
This patch imports logging and initiates a "logger = logging.getLogger(__name__)" object on each module.
Comment 1 Marinus Schraal 2017-08-20 14:36:32 UTC
Review of attachment 358016 [details] [review]:

For commit message see https://wiki.gnome.org/Git/CommitMessages in general and see earlier commits for how the project likes it. Keep it short and to the point: eg.  'Add missing logger imports' is sufficient here.

Try using git-bz for attaching patches : https://wiki.gnome.org/Git/WorkingWithPatches#How_to_attach_a_patch_to_a_bug_in_Bugzilla

::: gnomemusic/views/artistsview.py
@@ +23,3 @@
 # delete this exception statement from your version.
 
+import logging

blank line after this

@@ +132,3 @@
         if widget:
             artist_widget_model = self.player.running_playlist('Artist',
+                                                               widget.artist)

Whitespace corrections are fine, but should be a separate patch.

::: gnomemusic/views/songsview.py
@@ +23,3 @@
 # delete this exception statement from your version.
 
+import logging

blank line

@@ +91,3 @@
         try:
             itr = self.model.get_iter(path)
+        except ValueError as err:

separate patch
Comment 2 Jordan Petridis 2017-08-20 15:08:01 UTC
Created attachment 358017 [details] [review]
Removed extra blank line, redid the commit message.

I redid the commit message, hope its better and clearer now.

I am sorry for the blank lines, my editor has autopep8 enabled by default and didn't checked the diff before.
Comment 3 Marinus Schraal 2017-08-20 21:58:11 UTC
Review of attachment 358017 [details] [review]:

The links I gave are just a guideline, as I said a commit like this just needs some minor clarification. This is too much, the patch itself is clear enough. 'Add missing logger import' or something like it is fine for this. Don't go overboard. Also the 'title' (1st) line of the commit msg should not exceed 50 chars if possible (see the link about commit messages). If the 1st line is enough information, don't go make up a story below it.
Comment 4 Jordan Petridis 2017-08-21 07:33:57 UTC
Created attachment 358054 [details] [review]
Short and to the point I hope

oh g, about the commit message, when I read the review, I read insufficient for some reason, probably cause of anxiety from first time contributing.
Anyway that should do it.
Comment 5 Marinus Schraal 2017-08-21 09:12:54 UTC
Review of attachment 358054 [details] [review]:

Looks good to me.
Comment 6 Marinus Schraal 2017-08-21 21:59:03 UTC
Thanks for the patch.