Skip to content

Commit

Permalink
Change package installed detection
Browse files Browse the repository at this point in the history
  • Loading branch information
pepoluan committed Feb 18, 2021
1 parent 66215bc commit e0d3e28
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions release.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,8 @@
except FileNotFoundError:
print("Please install 'twine' first")
sys.exit(1)
result = subprocess.run(
["twine", "verify-upload"], stdout=subprocess.PIPE, stderr=subprocess.PIPE
)
if result.returncode == 2:
result = subprocess.run(["pip", "freeze"], stdout=subprocess.PIPE)
if b"\ntwine-verify-upload==" not in result.stdout:
print("*** Package twine-verify-upload is not yet installed.")
print("*** Consider installing it. It is very useful :)")
has_verify = False
Expand Down

0 comments on commit e0d3e28

Please sign in to comment.