Fix for restore cursor

This commit is contained in:
Dimitris Zlatanidis 2024-03-22 19:35:16 +02:00
parent 32b144b4f2
commit fdc20b3130

View file

@ -36,6 +36,9 @@ class CheckUpdates(Configs):
self.option_for_repository: bool = self.utils.is_option(
('-o', '--repository='), flags)
self.option_for_check: bool = self.utils.is_option(
('-c', '--check'), flags)
def check_the_repositories(self, queue) -> None:
if self.option_for_repository:
self.repositories(self.repository)
@ -143,6 +146,12 @@ class CheckUpdates(Configs):
if not process_1.is_alive():
process_2.terminate()
compare: dict = queue.get()
# Restore the terminal cursor
print('\x1b[?25h')
return queue.get()
if not self.option_for_check and not any(list(compare.values())):
print('\x1b[?25h', end='')
else:
print('\x1b[?25h')
return compare