swift-ring-builder blows up when not supported command requested.

swift-ring-builder uses outdated unbounded class method to handle
not supported command. It worked for python 2.6 or older but not
for python 2.7 or newer. This patch fixes the problem.
Change-Id: I7dbc681ef6be44f6d79ff93189ccca13c51eab74
Fixes: bug #1154882 
This commit is contained in:
tong li
2013年03月18日 09:04:13 -04:00
parent c2f8f00a3e
commit b530de2ad5

View File

@@ -694,9 +694,9 @@ if __name__ == '__main__':
if argv[0].endswith('-safe'):
try:
with lock_parent_directory(abspath(argv[1]), 15):
Commands.__dict__.get(command, Commands.unknown)()
Commands.__dict__.get(command, Commands.unknown.im_func)()
except exceptions.LockTimeout:
print "Ring/builder dir currently locked."
exit(2)
else:
Commands.__dict__.get(command, Commands.unknown)()
Commands.__dict__.get(command, Commands.unknown.im_func)()
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.