parameters: (self, entry, entry_dir)
docstring: Stores a LogEntry to entry_dir and adds it to git repo.
docstring_summary: Stores a LogEntry to entry_dir and adds it to git repo.
docstring_tokens: Stores a LogEntry to entry_dir and adds it to git repo .
function: def write_entry(self, entry, entry_dir):
          '''
          Stores a LogEntry to entry_dir and adds it to git repo.
          '''
  
          if not os.path.exists(entry_dir):
              os.mkdir(entry_dir)
          for filename, data in entry.__dict__.iteritems():
              if not data:
                  data = ""
              if not getattr(data, "__getitem__", False):
                  data = str(data)
              path = os.path.join(entry_dir, filename)
              with open(path, "wb") as fp:
                  fp.write(data)
                  fp.flush()
                  fp.close()
              subprocess.check_call(["git", "add", path], 
                      cwd=self.repo_path)
function_tokens: def write_entry ( self , entry , entry_dir ) : if not os . path . exists ( entry_dir ) : os . mkdir ( entry_dir ) for filename , data in entry . __dict__ . iteritems ( ) : if not data : data = "" if not getattr ( data , "__getitem__" , False ) : data = str ( data ) path = os . path . join ( entry_dir , filename ) with open ( path , "wb" ) as fp : fp . write ( data ) fp . flush ( ) fp . close ( ) subprocess . check_call ( [ "git" , "add" , path ] , cwd = self . repo_path )