Now verify-manifest.py is windows-compatible again
This commit is contained in:
1 parent
c35a887e1a
commit
e31bfb58f0
2 files changed
+12
-12
No files matched your search
@@ -1,28 +1,28 @@
|
||||
"""
|
||||
Exits with exit code 0 if manifest was verified.
|
||||
"""
|
||||
|
||||
from sh import check_manifest
|
||||
from sh import ErrorReturnCode_1
|
||||
import sys
|
||||
import subprocess
|
||||
import errno
|
||||
import os
|
||||
|
||||
EXPECTED_OUTPUT = "lists of files in version control and sdist match"
|
||||
|
||||
os.chdir("..") # Leave bin/
|
||||
|
||||
def verify_manifest():
|
||||
"""
|
||||
Returns a ``str`` containing output from ``check-manifest``.
|
||||
"""
|
||||
try:
|
||||
output = check_manifest().decode()
|
||||
except ErrorReturnCode_1 as e:
|
||||
output = e.stderr.decode() + e.stdout.decode()
|
||||
output = subprocess.check_output("check-manifest",
|
||||
stderr=subprocess.STDOUT)
|
||||
except subprocess.CalledProcessError as e:
|
||||
output = e.output
|
||||
|
||||
return output
|
||||
return output.decode().strip()
|
||||
|
||||
if __name__ == '__main__':
|
||||
output = verify_manifest()
|
||||
|
||||
print(output)
|
||||
|
||||
if output == EXPECTED_OUTPUT:
|
||||
|
||||
Reference in new issue
Block a user