From 1ceefd7d700caf18f2390b94aa81d9f0207a4d85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5kon=20Solbj=C3=B8rg?= Date: Tue, 2 Apr 2019 00:58:09 +0200 Subject: =?UTF-8?q?chore:=20Refactor=20to=20get=20switches=20from=20gondul?= =?UTF-8?q?=20before=20executing=20labler=20=E2=99=BB=EF=B8=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- switches.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'switches.py') diff --git a/switches.py b/switches.py index d6c80a7..ab444c6 100644 --- a/switches.py +++ b/switches.py @@ -1,5 +1,3 @@ -from gondul import fetch_gondul_switches - switch_label_format = "%(switch_name)s-%(switch_num)s" switch_label_layout = """ @@ -39,8 +37,7 @@ def write_html_to_file(html, outfile="switch_labels.html"): print("Wrote labels to '{}'.\nOpen the file in your browser and print it.".format(outfile)) -def make_switch_labels(): +def make_switch_labels(switches): print("Generating labels for switches") - switches = fetch_gondul_switches() labels = generate_labels(switches) write_html_to_file(labels) -- cgit v1.2.3