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

fix --complete exception caused due to context manager type error #169

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

elig0n
Copy link
Contributor

@elig0n elig0n commented Dec 30, 2024

This PR solves a TypeError exception that happened on python 3.12.3 when
running ddgr --complete blah on the latest git version.
It stems from the json.loads returned object (either list or dict) not accepted for the context.

  File "/usr/bin/ddgr", line 1982, in completer_fetch_completions
    with json.loads(resp.read().decode('utf-8')) as respobj:
TypeError: 'list' object does not support the context manager protocol

Feel free to comment and offer modifications.

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.

1 participant