def SaveCommitInformation(rebalance):
 loc = data_store.DB.Location()
 if (not os.path.exists(loc)):
  return False
 if (not os.path.isdir(loc)):
  return False
 tempdir = _CreateDirectory(loc, rebalance.id)
 tempfile = utils.JoinPath(tempdir, constants.TRANSACTION_FILENAME)
 with open(tempfile, 'wb') as fp:
  fp.write(rebalance.SerializeToString())
 return True

def SaveCommitInformation ( rebalance ) : loc = data_store . DB . Location ( ) if ( not os . path . exists ( loc ) ) : return False if ( not os . path . isdir ( loc ) ) : return False tempdir = _CreateDirectory ( loc , rebalance . id ) tempfile = utils . JoinPath ( tempdir , constants . TRANSACTION_FILENAME ) with open ( tempfile , 'wb' ) as fp : fp . write ( rebalance . SerializeToString ( ) ) return True
save rebalance object to file .