Merge "swift-(account|container)-info: tolerate LockTimeouts"

This commit is contained in:
Zuul
2018年04月11日 07:24:53 +00:00
committed by Gerrit Code Review

View File

@@ -16,6 +16,7 @@ import sys
from optparse import OptionParser
from swift.cli.info import print_info, InfoSystemExit
from swift.common.exceptions import LockTimeout
def run_print_info(args, opts):
@@ -23,7 +24,7 @@ def run_print_info(args, opts):
print_info('account', *args, **opts)
except InfoSystemExit:
sys.exit(1)
except sqlite3.OperationalError as e:
except (sqlite3.OperationalError, LockTimeout) as e:
if not opts.get('stale_reads_ok'):
opts['stale_reads_ok'] = True
print('Warning: Possibly Stale Data')

View File

@@ -16,6 +16,7 @@ import sys
from optparse import OptionParser
from swift.cli.info import print_info, InfoSystemExit
from swift.common.exceptions import LockTimeout
def run_print_info(args, opts):
@@ -23,7 +24,7 @@ def run_print_info(args, opts):
print_info('container', *args, **opts)
except InfoSystemExit:
sys.exit(1)
except sqlite3.OperationalError as e:
except (sqlite3.OperationalError, LockTimeout) as e:
if not opts.get('stale_reads_ok'):
opts['stale_reads_ok'] = True
print('Warning: Possibly Stale Data')
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.