diff --git a/usd/importer.py b/usd/importer.py
index db78802..a9b8f67 100755
--- a/usd/importer.py
+++ b/usd/importer.py
@@ -1202,11 +1202,18 @@ class USDImport:
else:
self.local_repo.push_lpusip()
lp = launchpad_login_auth()
- lp_git_repo = lp.git_repositories.getByPath(
- path='~%s/ubuntu/+source/%s/+git/%s' %
- (owner, pkgname, pkgname))
- if only_debian:
- lp_git_repo.default_branch = 'refs/heads/debian/sid'
- else:
- lp_git_repo.default_branch = 'refs/heads/ubuntu/devel'
- lp_git_repo.lp_save()
+ updated = False
+ while not updated:
+ try:
+ lp_git_repo = lp.git_repositories.getByPath(
+ path='~%s/ubuntu/+source/%s/+git/%s' %
+ (owner, pkgname, pkgname))
+ if only_debian:
+ lp_git_repo.default_branch = 'refs/heads/debian/sid'
+ else:
+ lp_git_repo.default_branch = 'refs/heads/ubuntu/devel'
+ lp_git_repo.lp_save()
+ updated = True
+ except (lazr.restfulclient.errors.NotFound,
+ lazr.restfulclient.errors.PreconditionFailed) as e:
+ pass