Skip to content

Commit d31a533

Browse files
committed
Scripts cleanup
1 parent de1843d commit d31a533

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

installers/common.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def parseCommandLine() -> argparse.Namespace :
1919
return args
2020

2121
def getVersion(builddir: Path):
22-
verRes = subprocess.run([builddir/'wsddn', '--version'], capture_output=True, encoding='utf-8')
22+
verRes = subprocess.run([builddir/'wsddn', '--version'], check=False, capture_output=True, encoding='utf-8')
2323
if verRes.returncode != 0:
2424
sys.exit(1)
2525
version = verRes.stdout.strip()
@@ -41,6 +41,3 @@ def copyTemplated(src, dst, map):
4141
dstdir.mkdir(parents=True, exist_ok=True)
4242
dst.write_text(src.read_text().format_map(map))
4343

44-
# def uploadResults(installer, symfile, version):
45-
# subprocess.run(['aws', 's3', 'cp', symfile, f's3://wsddn-symbols/{symfile.name}'], check=True)
46-
# subprocess.run(['gh', 'release', 'upload', f'v{version}', installer], check=True)

installers/freebsd/make-toolchain.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
print(f'no platform->arch mapping for {platform}', file=sys.stderr)
3131
sys.exit(1)
3232

33-
verRes = subprocess.run(['freebsd-version'], capture_output=True, encoding='utf-8')
33+
verRes = subprocess.run(['freebsd-version'], check=False, capture_output=True, encoding='utf-8')
3434
if verRes.returncode != 0:
3535
sys.exit(1)
3636
fullVersion = verRes.stdout.strip()
@@ -71,7 +71,7 @@
7171
print(f'{outdir} already contains the requested toolchain')
7272
sys.exit(0)
7373
print(f'{outdir} contains non-matching existing toolchain: \n{json.dumps(info, indent=4)}\nwill overwrite')
74-
except (FileNotFoundError):
74+
except FileNotFoundError:
7575
pass
7676

7777
if outdir.exists():
@@ -90,7 +90,7 @@
9090
procTar.wait()
9191
procCurl.wait()
9292
if procTar.returncode != 0 or procCurl.returncode != 0:
93-
print(f'unpacking failed', file=sys.stderr)
93+
print('unpacking failed', file=sys.stderr)
9494
sys.exit(1)
9595

9696

0 commit comments

Comments
 (0)