diff --git a/bin/swift-get-nodes b/bin/swift-get-nodes index 9d09517487..e1744274f3 100644 --- a/bin/swift-get-nodes +++ b/bin/swift-get-nodes @@ -59,7 +59,7 @@ if __name__ == '__main__': ring = ring_name = None if ring_path: - ring_name = basename(ring_path)[:len('ring.gz')] + ring_name = basename(ring_path)[:-len('.ring.gz')] ring = Ring(ring_path) try: diff --git a/swift/cli/info.py b/swift/cli/info.py index c61ee2fe6c..5c8fb805be 100644 --- a/swift/cli/info.py +++ b/swift/cli/info.py @@ -49,7 +49,7 @@ def parse_get_node_args(options, args): if options.policy_name: if POLICIES.get_by_name(options.policy_name) is None: raise InfoSystemExit('No policy named %r' % options.policy_name) - elif args and args[0].endswith('ring.gz'): + elif args and args[0].endswith('.ring.gz'): if os.path.exists(args[0]): ring_path = args.pop(0) else: