mirror of
https://github.com/simonw/sqlite-utils.git
synced 2026-09-16 05:24:26 +02:00
Fix type warning for pipe.stdout possibly being None
Add conditional check before calling .read() on pipe.stdout since Popen can return None for stdout. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
fd5b09f64b
commit
cb172edca0
1 changed files with 1 additions and 1 deletions
|
|
@ -79,7 +79,7 @@ author = "Simon Willison"
|
||||||
#
|
#
|
||||||
# The short X.Y version.
|
# The short X.Y version.
|
||||||
pipe = Popen("git describe --tags --always", stdout=PIPE, shell=True)
|
pipe = Popen("git describe --tags --always", stdout=PIPE, shell=True)
|
||||||
git_version = pipe.stdout.read().decode("utf8")
|
git_version = pipe.stdout.read().decode("utf8") if pipe.stdout else ""
|
||||||
|
|
||||||
if git_version:
|
if git_version:
|
||||||
version = git_version.rsplit("-", 1)[0]
|
version = git_version.rsplit("-", 1)[0]
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue