Compare commits

...

3 Commits

Author SHA1 Message Date
Lily c037a3f7ca
Merge 56b3f1aca2 into 76bea74a08 2024-10-07 14:59:01 +02:00
Ryein Goddard 76bea74a08
Handle situations where terminalsize cannot be found 2024-10-07 13:59:49 +05:30
Lily 56b3f1aca2
Use `--shallow-submodules` for `--depth=1` on submodules 2024-08-07 14:13:52 +03:00
2 changed files with 5 additions and 2 deletions

View File

@ -75,7 +75,7 @@ processors work just fine (even for macOS Sonoma).
``` ```
cd ~ cd ~
git clone --depth 1 --recursive https://github.com/kholia/OSX-KVM.git git clone --depth 1 --recursive --shallow-submodules https://github.com/kholia/OSX-KVM.git
cd OSX-KVM cd OSX-KVM
``` ```

View File

@ -234,7 +234,10 @@ def save_image(url, sess, filename='', directory=''):
break break
fh.write(chunk) fh.write(chunk)
size += len(chunk) size += len(chunk)
try:
terminalsize = max(os.get_terminal_size().columns - TERMINAL_MARGIN, 0) terminalsize = max(os.get_terminal_size().columns - TERMINAL_MARGIN, 0)
except OSError:
terminalsize = 80
if oldterminalsize != terminalsize: if oldterminalsize != terminalsize:
print(f'\r{"":<{terminalsize}}', end='') print(f'\r{"":<{terminalsize}}', end='')
oldterminalsize = terminalsize oldterminalsize = terminalsize