mirror of
https://github.com/mbirth/tcl_ota_check.git
synced 2024-11-12 23:36:46 +00:00
make escape characters semi-work on windows
This commit is contained in:
parent
445502b544
commit
0e3ebafb2d
@ -6,6 +6,7 @@
|
|||||||
import tcllib
|
import tcllib
|
||||||
from requests.exceptions import RequestException, Timeout
|
from requests.exceptions import RequestException, Timeout
|
||||||
|
|
||||||
|
tcllib.make_escapes_work()
|
||||||
ANSI_UP_DEL = u"\u001b[F\u001b[K"
|
ANSI_UP_DEL = u"\u001b[F\u001b[K"
|
||||||
|
|
||||||
fc = tcllib.FotaCheck()
|
fc = tcllib.FotaCheck()
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
import tcllib
|
import tcllib
|
||||||
from requests.exceptions import RequestException, Timeout
|
from requests.exceptions import RequestException, Timeout
|
||||||
|
|
||||||
|
tcllib.make_escapes_work()
|
||||||
ANSI_UP_DEL = u"\u001b[F\u001b[K"
|
ANSI_UP_DEL = u"\u001b[F\u001b[K"
|
||||||
|
|
||||||
fc = tcllib.FotaCheck()
|
fc = tcllib.FotaCheck()
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
import tcllib
|
import tcllib
|
||||||
from requests.exceptions import RequestException, Timeout
|
from requests.exceptions import RequestException, Timeout
|
||||||
|
|
||||||
|
tcllib.make_escapes_work()
|
||||||
ANSI_UP_DEL = u"\u001b[F\u001b[K"
|
ANSI_UP_DEL = u"\u001b[F\u001b[K"
|
||||||
|
|
||||||
fc = tcllib.FotaCheck()
|
fc = tcllib.FotaCheck()
|
||||||
|
13
tcllib.py
13
tcllib.py
@ -5,6 +5,7 @@
|
|||||||
import base64
|
import base64
|
||||||
import binascii
|
import binascii
|
||||||
import hashlib
|
import hashlib
|
||||||
|
import platform
|
||||||
import random
|
import random
|
||||||
import time
|
import time
|
||||||
import xml.dom.minidom
|
import xml.dom.minidom
|
||||||
@ -17,6 +18,18 @@ except (ImportError, AttributeError):
|
|||||||
from xml.etree import ElementTree
|
from xml.etree import ElementTree
|
||||||
import requests
|
import requests
|
||||||
|
|
||||||
|
|
||||||
|
def make_escapes_work():
|
||||||
|
system = platform.system()
|
||||||
|
if system == "Windows":
|
||||||
|
try:
|
||||||
|
import colorama
|
||||||
|
except ImportError:
|
||||||
|
pass
|
||||||
|
else:
|
||||||
|
colorama.init()
|
||||||
|
|
||||||
|
|
||||||
class FotaCheck:
|
class FotaCheck:
|
||||||
VDKEY = b"eJwdjwEOwDAIAr8kKFr//7HhmqXp8AIIDrYAgg8byiUXrwRJRXja+d6iNxu0AhUooDCN9rd6rDLxmGIakUVWo3IGCTRWqCAt6X4jGEIUAxgN0eYWnp+LkpHQAg/PsO90ELsy0Npm/n2HbtPndFgGEV31R9OmT4O4nrddjc3Qt6nWscx7e+WRHq5UnOudtjw5skuV09pFhvmqnOEIs4ljPeel1wfLYUF4\n"
|
VDKEY = b"eJwdjwEOwDAIAr8kKFr//7HhmqXp8AIIDrYAgg8byiUXrwRJRXja+d6iNxu0AhUooDCN9rd6rDLxmGIakUVWo3IGCTRWqCAt6X4jGEIUAxgN0eYWnp+LkpHQAg/PsO90ELsy0Npm/n2HbtPndFgGEV31R9OmT4O4nrddjc3Qt6nWscx7e+WRHq5UnOudtjw5skuV09pFhvmqnOEIs4ljPeel1wfLYUF4\n"
|
||||||
CKTP_CHECKAUTO = 1
|
CKTP_CHECKAUTO = 1
|
||||||
|
Loading…
Reference in New Issue
Block a user