<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def update(self, folder, git_repository):
 """Creates or updates theme folder according given git repository. :param git_repository: git url of the theme folder :param folder: path of the git managed theme folder """

        # git clone
        try:
            self.clone(folder, git_repository)
        # git update if folder already exist
        except OSError:
            self.update_git_repository(folder, git_repository)
            self.pull(folder)