[rhinstaller/blivet/pulls/116 master] Filter GLib.GError instead of GLib.Error in pylint false positives.

mulkieran installerbot-noreply at redhat.com
Wed May 13 16:48:09 UTC 2015


There is a sense in which the code that initializes ```libblockdev``` in ```blivet/__init__.py``` that is causing the pylint error shouldn't be like it is and that the interface of the methods ```try_init()``` and ```reinit()``` should be changed. At first I thought that
the change should be that more work should be done on ErrorProxy so that these methods actually raised an exception in some sublcass of ```BlockDevError```. That would require a little work in the ```ErrorProxy``` definition, AFAICT, because these methods don't belong to a particular plugin, and so their prefix is really the empty string (and other problems related to that).

But now I think that a plugin not getting loaded should not be something that raises an exception and that the idea that each of these methods should return a list of the plugins loaded is actually still a very good one. I think that implementing this would require a bit of work in blockdev.c to enrich the information returned by the various methods, but that it would probably be worth the effort. I also think that the meaning of the static variable ```initialized``` might have to be modified...I think that now it means all plugins were succesfully loaded. What that means is that if not all plugins are loaded in ```blivet/__init__.py``` ```initialized``` will always be false. ```initialized``` seems more like ```complete``` to me.


-- 
To view this pull request on github, visit https://github.com/rhinstaller/blivet/pull/116


More information about the anaconda-patches mailing list