By shadowing corral_file inside the with block, we're changing its type form a string to a file descriptor.
If we error inside this block, we'll try to print the path of the corral file. Since it's no longer a string at that time, trying to concatenate it with other strings will fail with "TypeError: can only concatenate str (not "_io.TextIOWrapper") to str"
By shadowing
corral_file
inside thewith
block, we're changing its type form a string to a file descriptor.If we error inside this block, we'll try to print the path of the corral file. Since it's no longer a string at that time, trying to concatenate it with other strings will fail with "TypeError: can only concatenate str (not "_io.TextIOWrapper") to str"
See error: https://github.com/ergl/pony-protobuf/runs/6708413752?check_suite_focus=true#step:4:46, which failed inside the
except
block when trying to read from a corral file without "documentation_url"