In [1]:
import sh

In [2]:
try:
    lines = sh.tail('hello')
except sh.ErrorReturnCode_1:
    lines = []
    print('nada')


nada