From 1d3b7da71802d6b39bbf3db244961ebc42be6b6e Mon Sep 17 00:00:00 2001 From: Nathan Gardiner Date: Mon, 28 Feb 2022 18:39:49 +1100 Subject: [PATCH] Commit changes for Release v1.2.6 --- CHANGELOG.md | 6 ++++++ README.md | 2 +- lib/TWCManager/Control/HTTPControl.py | 9 +++++++-- lib/TWCManager/Control/themes/Default/navbar.html.j2 | 2 +- lib/TWCManager/TWCMaster.py | 2 +- setup.py | 2 +- 6 files changed, 17 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2545de32..1094e3c6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,12 @@ This document logs the changes per release of TWCManager. ## v1.3.0 - Latest Development version +## v1.2.6 - 2022-02-28 + + * Bugfixes: + * (@ngardiner) - Fix for exception regarding serialization of bytes object in JSON data for Tesla Auth Flow + * (@ngardiner) - First revision of self-update mechanism for TWCManager - will be activated once v1.3.0 is released + ## v1.2.5 - 2022-02-27 * Bugfixes: diff --git a/README.md b/README.md index 5f15a84a..97d70bc1 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # TWCManager -[![Stable Release](https://img.shields.io/badge/Stable_Release-1.2.5-blue)](https://github.com/ngardiner/TWCManager/releases/tag/v1.2.5) +[![Stable Release](https://img.shields.io/badge/Stable_Release-1.2.6-blue)](https://github.com/ngardiner/TWCManager/releases/tag/v1.2.6) [![Development Release](https://img.shields.io/badge/Devel_Release-1.3.0-green.svg)](https://github.com/ngardiner/TWCManager/tree/main) ![Build Status](https://github.com/ngardiner/TWCManager/actions/workflows/test_suite.yml/badge.svg) ![GitHub commits](https://img.shields.io/github/commit-activity/m/ngardiner/TWCManager) diff --git a/lib/TWCManager/Control/HTTPControl.py b/lib/TWCManager/Control/HTTPControl.py index 9db1ac8d..f70825f2 100644 --- a/lib/TWCManager/Control/HTTPControl.py +++ b/lib/TWCManager/Control/HTTPControl.py @@ -812,6 +812,11 @@ def do_GET(self): if self.url.path == "/upgrade": # This is extremely beta + # Attempt a self-update of TWCManager by calling pip + self.send_response(200) + self.send_header("Content-type", "text/html") + self.end_headers() + self.template = self.templateEnv.get_template("upgrade.html.j2") page = self.template.render(self.__dict__) @@ -826,10 +831,10 @@ def do_GET(self): "--upgrade", "TWCManager", ] - ) + ).decode("UTF-8") except subprocess.CalledProcessError as error: page += "An error occurred attempting upgrade: " + str( - error.output() + error ) self.wfile.write(page.encode("utf-8")) diff --git a/lib/TWCManager/Control/themes/Default/navbar.html.j2 b/lib/TWCManager/Control/themes/Default/navbar.html.j2 index 28e83243..cb2f5058 100644 --- a/lib/TWCManager/Control/themes/Default/navbar.html.j2 +++ b/lib/TWCManager/Control/themes/Default/navbar.html.j2 @@ -19,7 +19,7 @@ v{{ master.version }} {% if checkForUpdates() %}   - (v{{ checkForUpdates() }} Available) + (v{{ checkForUpdates() }} Available) {% endif %} diff --git a/lib/TWCManager/TWCMaster.py b/lib/TWCManager/TWCMaster.py index 7d341fd3..85fdc460 100644 --- a/lib/TWCManager/TWCMaster.py +++ b/lib/TWCManager/TWCMaster.py @@ -67,7 +67,7 @@ class TWCMaster: teslaLoginAskLater = False TWCID = None updateVersion = False - version = "1.2.5" + version = "1.2.6" # TWCs send a seemingly-random byte after their 2-byte TWC id in a number of # messages. I call this byte their "Sign" for lack of a better term. The byte diff --git a/setup.py b/setup.py index 05cb7e91..732dac6f 100755 --- a/setup.py +++ b/setup.py @@ -4,7 +4,7 @@ setup( name="TWCManager", - version="1.2.5", + version="1.2.6", package_dir={"": "lib"}, packages=find_namespace_packages(where="lib"), python_requires=">= 3.6",