-
Notifications
You must be signed in to change notification settings - Fork 52
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
metadata-check: ignore GTK widgets if no display #2141
metadata-check: ignore GTK widgets if no display #2141
Conversation
Allow check to pass for GTK widgets if there is no display in the environment.
(Travis CI failure unrelated.) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've checked this both in the easy test case, and in the real life use-case where I discovered this, and it does fix the issue, and to my knowledge the code change looks sensible too (though I'm happy to defer to an expert).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes look suitable & valid so I am happy to approve given they resolve the issue as you have observed. Though perhaps we could trim the exception pair (220:227) in 'metadata_check.py' down to the following:
except Exception as exc:
# Ignore if there is no display for GTK widget
if (isinstance(exc, RuntimeError) and not os.getenv('DISPLAY') and
exc.args == ('could not open display',)):
return
return INVALID_IMPORT.format(widget_name, type(exc).__name__, exc)
Something has changed how "%" is displayed in output of sqlite.
Exception consolidated. (I have also included the unrelated fix to Travis CI here.) |
Allow check to pass for GTK widgets if there is no display in the environment.
Problem reported by @scwhitehouse.