Code quality and missing variables

This commit is contained in:
Peter Šurda 2024-07-07 15:38:33 +08:00
parent 8253e5fc51
commit 7209cea893
Signed by untrusted user: PeterSurda
GPG Key ID: 3E47497CF67ABB95

View File

@ -1,8 +1,8 @@
import os
import urllib.error
import urllib.request
import logging
import json
import http.client
import subprocess
import re
import shutil
@ -499,15 +499,16 @@ def main():
host, api_key = validate_env_vars()
server_data = ServerData()
post_data = server_data.create_post_data()
server_manager = ServerManager(host, api_key)
server_data = ServerData()
os_list = server_manager.get_os_list()
post_data = server_data.create_post_data(os_list)
server_id = server_manager.upsert_server(post_data)
logging.info('Server id: {}'.format(server_id))
os_list = server_manager.get_os_list()
note_data = server_data.create_note_data()
server_manager.upsert_note(note_data, server_id)