Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Conversation

@akhilnarang
Copy link

Resolves #252

pdfkit/pdfkit.py Outdated
Comment on lines 191 to 197
kwargs = {"input": input}

# Check if a timeout was specified and pass it along if so
if self.timeout:
kwargs["timeout"] = self.timeout

stdout, stderr = result.communicate(**kwargs)
Copy link

Choose a reason for hiding this comment

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

Suggested change
kwargs = {"input": input}
# Check if a timeout was specified and pass it along if so
if self.timeout:
kwargs["timeout"] = self.timeout
stdout, stderr = result.communicate(**kwargs)
stdout, stderr = result.communicate(input=input, timeout=timeout)

This should work too?

Copy link
Author

@akhilnarang akhilnarang Oct 26, 2023

Choose a reason for hiding this comment

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

Yep works, can't remember exactly why I had wanted to avoid passing a None value.
However the default value for timeout is None, so definitely makes sense to just do this.

Signed-off-by: Akhil Narang <me@akhilnarang.dev>
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.

feature request - support specifying timeout for pdf generation

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.