build.py: fix build/native confusion in function name
authorHelmut Grohne <helmut@subdivi.de>
Sun, 11 Oct 2020 17:39:45 +0000 (19:39 +0200)
committerHelmut Grohne <helmut@subdivi.de>
Sun, 11 Oct 2020 17:39:45 +0000 (19:39 +0200)
build.py

index 7906615..cb370ae 100755 (executable)
--- a/build.py
+++ b/build.py
@@ -45,7 +45,7 @@ def do_build(source, version, architecture, server):
     print("status %s code %d" % (status, code))
     return (now, code == 0, logtarget, status == "given-back")
 
-def get_build_arch():
+def get_native_arch() -> str:
     return subprocess.check_output(["dpkg", "--print-architecture"],
                                    encoding="ascii").strip()
 
@@ -54,7 +54,7 @@ def main():
     argp.add_argument("server", help="machine to build on")
     argp.add_argument("--buildarch", help="build architecture of the server")
     args = argp.parse_args()
-    buildarch = args.buildarch or get_build_arch()
+    buildarch = args.buildarch or get_native_arch()
     db = sqlite3.connect("db", detect_types=sqlite3.PARSE_DECLTYPES)
     with contextlib.closing(db.cursor()) as cur:
         cur.execute("BEGIN IMMEDIATE;")