make it easier for subclasses of swift.common.client.Connection to override the behavior of reauthorization (get_auth)

This commit is contained in:
Clay Gerrard
2010年08月19日 11:54:55 -05:00
parent e876b2432a
commit cc1373d9bc

View File

@@ -629,6 +629,9 @@ class Connection(object):
self.attempts = 0
self.snet = snet
def get_auth(self):
return get_auth(self.authurl, self.user, self.key, snet=self.snet)
def _retry(self, func, *args, **kwargs):
kwargs['http_conn'] = self.http_conn
self.attempts = 0
@@ -637,9 +640,7 @@ class Connection(object):
self.attempts += 1
try:
if not self.url or not self.token:
self.url, self.token = \
get_auth(self.authurl, self.user, self.key,
snet=self.snet)
self.url, self.token = self.get_auth()
self.http_conn = None
if not self.http_conn:
self.http_conn = http_connection(self.url)
Reference in New Issue
openstack/swift
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.

The note is not visible to the blocked user.