notebook.community
Edit and run
In [1]: import sh
import sh
In [2]: try: lines = sh.tail('hello') except sh.ErrorReturnCode_1: lines = [] print('nada')
try: lines = sh.tail('hello') except sh.ErrorReturnCode_1: lines = [] print('nada')
nada