Git clone fails if a remote branch has been deleted
When a v1.x-dev branch gets deleted, if you previously had it in your local cache of the spec files, the next git pull will fail. The only solution to this at present is to manually delete the cache directory. Ideally this should be detected and handled more gracefully.
diff --git a/nmos-test.py b/nmos-test.py
index ad08261..657688b 100644
--- a/nmos-test.py
+++ b/nmos-test.py
@@ -259,8 +259,12 @@ if __name__ == '__main__':
             # Only pull if we haven't in the last hour
             if (last_pull_time + timedelta(hours=1)) <= time_now:
                 print(" * Pulling latest files for repository '{}'".format(repo_data["repo"]))
-                repo.remotes.origin.pull()
-                update_last_pull = True
+                try:
+                    repo.remotes.origin.pull()
+                    update_last_pull = True
+                except Exception as e:
+                    print(" * ERROR: Unable to update repository '{}'. If the problem persists, "
+                          "please delete the '{}' directory".format(repo_data["repo"], CACHE_PATH))
 
     if update_last_pull:
         try:

['nmos-test.py']