def get_commit():
 if (not os.path.exists(os.path.join(directories.dataDir, 'GIT-COMMIT'))):
  try:
   return subprocess.check_output('git rev-parse HEAD'.split()).strip()
  except:
   return 'unknown'
 fin = open(os.path.join(directories.dataDir, 'GIT-COMMIT'), 'rb')
 v = fin.read().strip()
 fin.close()
 return v

def get_commit ( ) : if ( not os . path . exists ( os . path . join ( directories . dataDir , 'GIT-COMMIT' ) ) ) : try : return subprocess . check_output ( 'git rev-parse HEAD' . split ( ) ) . strip ( ) except : return 'unknown' fin = open ( os . path . join ( directories . dataDir , 'GIT-COMMIT' ) , 'rb' ) v = fin . read ( ) . strip ( ) fin . close ( ) return v
loads the git commit id from the bundled version file .