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

If the json file is incorrect formatted, show the impacted file #1665

Closed
wants to merge 1 commit into from

Conversation

sylvestre
Copy link
Contributor

No description provided.

if i['pid'] not in append_pids and
(i['hostname'] + ":" + str(i['pid'])) not in remove and
__checkInstance(i['hostname'], i['pid'])]
try:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have a function in our util to handle invalid json files:

def load_json_or_empty(path, default=None, kind=None):

It would be better to use this.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sylvestre Do you plan to update this pull request? If yes please fix pycodestyle error:

libcodechecker/server/instance_manager.py:79:80: E501 line too long (80 > 79 characters)

Note: I have created a separate pull request (#1695) to handle invalid json files properly in all places. So if you fix the style error we will accept this pull request.

@csordasmarton
Copy link
Contributor

This problem has already been solved in #1695.

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

Successfully merging this pull request may close these issues.

4 participants