question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Control-C in manual.py continues directory loop

See original GitHub issue

I’ve tried to track this down but can’t quite figure it out. When running manual.py on a directory control-c isn’t properly handled and the processing of the current file with ffmpeg ends, but then the next file starts processing. In a large directory the only way to kill the script is to force close the console. The exception is first raised here:

ffmpeg.py - polling loop in convert(), typically around stderr.read(10)

I lose track of what happens with all the async generators after this point. I’d expect the KeyboardInterrupt to be raised back high enough that the loop for filepath in files: in manual.py - walkDir is exited gracefully.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:12 (12 by maintainers)

github_iconTop GitHub Comments

1reaction
mdhigginscommented, Jan 16, 2022

Alright merged into master, closing this out and the PR, thanks for testing and the PR

0reactions
stevemk14ebrcommented, Jan 16, 2022

this works great, I think it’s ready!

Read more comments on GitHub >

github_iconTop Results From Across the Web

4. More Control Flow Tools — Python 3.11.1 documentation
It is an object which returns the successive items of the desired sequence when you iterate over it, but it doesn't really make...
Read more >
Python input control loop - Stack Overflow
I have identified some problems. First, the input statement you are using would just raise an error if a float value is entered, ......
Read more >
Bash Reference Manual - GNU.org
The break and continue builtins (see Bourne Shell Builtins) may be used to control loop execution. Next: Grouping Commands, Previous: Looping ...
Read more >
Python For Loop – Example and Tutorial - freeCodeCamp
A for loop can iterate over every item in a list or go through every single character in a string and won't stop...
Read more >
What are the Control Statements in Python? | Flexiple Tutorials
In Python, Loops are used to iterate repeatedly over a block of code. ... When a program encounters a continue statement in Python, ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found