diff --git a/ggt/main.py b/ggt/main.py index 304316d9..d574499f 100755 --- a/ggt/main.py +++ b/ggt/main.py @@ -41,15 +41,19 @@ def git_pull(path, local_path="/tmp/giggity.git"): porcelain.pull(local_path, path) return local_path except dulwich.errors.NotGitRepository: - t = tempfile.mkdtemp(prefix=local_path) - repo = porcelain.clone(path, bare=True, target=t, checkout=False) - try: - os.rename(t, local_path) - return local_path - except OSError: - # Guess there may have been a race. All we know - # is the one we just created should work. - return t + pass + # Expected first time, run stuff below instead. + # (But doing so within this block causes weird error reporting.) + + t = tempfile.mkdtemp(prefix=local_path) + repo = porcelain.clone(path, bare=True, target=t, checkout=False) + try: + os.rename(t, local_path) + return local_path + except OSError: + # Guess there may have been a race. All we know + # is the one we just created should work. + return t # json_get (shortcut to dig through json nested dicts..) diff --git a/ggt/requirements.txt b/ggt/requirements.txt index c958ab63..63ab49b2 100644 --- a/ggt/requirements.txt +++ b/ggt/requirements.txt @@ -1,4 +1,4 @@ -dulwich==0.19.13 -Flask==2.3.2 -google-cloud-storage==1.23.0 -jsonschema==2.6.0 +dulwich==0.21.6 +Flask==2.3.3 +google-cloud-storage==2.13.0 +jsonschema==4.10.3