mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2025-01-13 20:01:48 +01:00
Fixed for KeyboardInterrupt
This commit is contained in:
parent
668453bd60
commit
00dd96bbd3
3 changed files with 13 additions and 6 deletions
|
@ -6,6 +6,7 @@ Updated:
|
|||
Fixed:
|
||||
- Summary for upgrade packages
|
||||
- Downloader for KeyboardInterrupt
|
||||
- Build and install for KeyboardInterrupt
|
||||
|
||||
BugFixed:
|
||||
- Default build path /tmp/slpkg/build
|
||||
|
|
|
@ -22,6 +22,9 @@ class ProgressBar(Configs):
|
|||
""" Creating progress bar. """
|
||||
spinner = PixelSpinner(f'{self.endc}{message} {filename} {self.bviolet}')
|
||||
# print('\033[F', end='', flush=True)
|
||||
while True:
|
||||
time.sleep(0.1)
|
||||
spinner.next()
|
||||
try:
|
||||
while True:
|
||||
time.sleep(0.1)
|
||||
spinner.next()
|
||||
except KeyboardInterrupt:
|
||||
raise SystemExit(1)
|
||||
|
|
|
@ -340,9 +340,12 @@ class Slackbuilds(Configs):
|
|||
|
||||
def process(self, command: str) -> None:
|
||||
""" Processes execution. """
|
||||
self.output = subprocess.call(command, shell=True, stderr=self.stderr, stdout=self.stdout)
|
||||
if self.output != 0:
|
||||
raise SystemExit(self.output)
|
||||
try:
|
||||
self.output = subprocess.call(command, shell=True, stderr=self.stderr, stdout=self.stdout)
|
||||
if self.output != 0:
|
||||
raise SystemExit(self.output)
|
||||
except KeyboardInterrupt:
|
||||
raise SystemExit(1)
|
||||
|
||||
def print_error(self) -> None:
|
||||
""" Stop the process and print the error message. """
|
||||
|
|
Loading…
Reference in a new issue