import subprocess


def run(command):
    try:
        subprocess.check_call(command, shell=True)
    except:
        pass

import subprocess


def run(command):
    try:
        subprocess.check_call(command, shell=True)
    except Exception:
        pass

Set expected exception class in "except" block