Skip to content

Commit 8ae34c5

Browse files
committed
Merge pull request #1332 from deis/fix-auth-cancel
fix(controller): ignore KeyError when purging user from etcd
2 parents 8e11748 + 97eddbc commit 8ae34c5

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

controller/api/models.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -618,7 +618,12 @@ def _etcd_purge_key(**kwargs):
618618

619619
def _etcd_purge_user(**kwargs):
620620
username = kwargs['instance'].username
621-
_etcd_client.delete('/deis/builder/users/{}'.format(username), dir=True, recursive=True)
621+
try:
622+
_etcd_client.delete(
623+
'/deis/builder/users/{}'.format(username), dir=True, recursive=True)
624+
except KeyError:
625+
# If _etcd_publish_key() wasn't called, there is no user dir to delete.
626+
pass
622627

623628

624629
def _etcd_publish_domains(**kwargs):

0 commit comments

Comments
 (0)