]> git.scottworley.com Git - pinch/commitdiff
Rename top-level procedures
authorScott Worley <scottworley@scottworley.com>
Thu, 9 Apr 2020 00:37:51 +0000 (17:37 -0700)
committerScott Worley <scottworley@scottworley.com>
Thu, 9 Apr 2020 00:37:51 +0000 (17:37 -0700)
pinch.py

index f22a1c39ad5d0bc795fd578d2dacc58b793b033f..f0f0422047a0f434b9c07c618a9ac5dea45f84ea 100644 (file)
--- a/pinch.py
+++ b/pinch.py
@@ -120,7 +120,7 @@ def fetch(v: Verification, channel_url: str) -> Info:
     return info
 
 
-def parse_table(v: Verification, info: Info) -> None:
+def parse_channel(v: Verification, info: Info) -> None:
     v.status('Parsing channel description as XML')
     d = xml.dom.minidom.parseString(info.channel_html)
     v.ok()
@@ -206,7 +206,7 @@ def fetch_resources(v: Verification, info: Info) -> None:
             info.table['git-revision'].file).read(999) == info.git_commit)
 
 
-def extract_channel(v: Verification, info: Info) -> None:
+def check_channel_contents(v: Verification, info: Info) -> None:
     with tempfile.TemporaryDirectory() as d:
         v.status('Extracting %s' % info.table['nixexprs.tar.xz'].file)
         shutil.unpack_archive(info.table['nixexprs.tar.xz'].file, d)
@@ -218,9 +218,9 @@ def extract_channel(v: Verification, info: Info) -> None:
 def main() -> None:
     v = Verification()
     info = fetch(v, 'https://channels.nixos.org/nixos-20.03')
-    parse_table(v, info)
+    parse_channel(v, info)
     fetch_resources(v, info)
-    extract_channel(v, info)
+    check_channel_contents(v, info)
     print(info)