Skip to content

Instantly share code, notes, and snippets.

@t0ster
Created August 7, 2012 14:41
Show Gist options
  • Save t0ster/3285911 to your computer and use it in GitHub Desktop.
Save t0ster/3285911 to your computer and use it in GitHub Desktop.
try:
import gitinfo as GIT_INFO
GIT_INFO_BRANCH = GIT_INFO.BRANCH
GIT_INFO_REV = GIT_INFO.REV
except ImportError:
GIT_INFO = object()
GIT_INFO_BRANCH = '-1'
GIT_INFO_REV = '-1'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment