Skip to content

Instantly share code, notes, and snippets.

@cwshu
Last active August 29, 2015 14:04
Show Gist options
  • Save cwshu/944586b01a5ccd685397 to your computer and use it in GitHub Desktop.
Save cwshu/944586b01a5ccd685397 to your computer and use it in GitHub Desktop.
get false command(return 0) output by check_output
import subprocess as sub
out = sub.check_output("diff NEWS NEWS.old || true", shell=True)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment