Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filter GLib.GError instead of GLib.Error in pylint false positives. #116

Merged
merged 1 commit into from May 13, 2015

Conversation

mulkieran
Copy link
Contributor

GError and Error are just aliases of each other, and GError is more
distinctive, thus a better choice for filtering so long as it is
used always in place of Error.

Should have gone in with commit 3f0aa44.

Signed-off-by: mulhern amulhern@redhat.com

GError and Error are just aliases of each other, and GError is more
distinctive, thus a better choice for filtering so long as it is
used always in place of Error.

Should have gone in with commit 3f0aa44.

Signed-off-by: mulhern <amulhern@redhat.com>
@mulkieran
Copy link
Contributor Author

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.

@mulkieran
Copy link
Contributor Author

clumens acked this trivial change.

mulkieran added a commit that referenced this pull request May 13, 2015
Filter GLib.GError instead of GLib.Error in pylint false positives.
@mulkieran mulkieran merged commit e0eda4d into storaged-project:master May 13, 2015
@mulkieran mulkieran deleted the master-gerror branch May 13, 2015 22:11
@vpodzime
Copy link
Contributor

I understand the point. The discussion and tracking should go on in some libblockdev-related place, so I created a separate issue.

@mulkieran
Copy link
Contributor Author

Great, thanks!

  • mulhern

----- Original Message -----

From: "Vratislav Podzimek" notifications@github.com
To: "rhinstaller/blivet" blivet@noreply.github.com
Cc: "mulkieran" amulhern@redhat.com
Sent: Thursday, May 14, 2015 2:45:26 AM
Subject: Re: [blivet] Filter GLib.GError instead of GLib.Error in pylint false positives. (#116)

I understand the point. The discussion and tracking should go on in some
libblockdev-related place, so I created a separate issue.


Reply to this email directly or view it on GitHub:
#116 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants