mirror of
https://github.com/ceph/ceph
synced 2025-02-19 08:57:27 +00:00
Merge PR #29095 into master
* refs/pull/29095/head: script/ptl-tool: update for python3 Reviewed-by: Sage Weil <sage@redhat.com>
This commit is contained in:
commit
78564dcd0e
@ -1,4 +1,4 @@
|
||||
#!/usr/bin/env python2
|
||||
#!/usr/bin/python3
|
||||
|
||||
# README:
|
||||
#
|
||||
@ -215,8 +215,8 @@ def build_branch(args):
|
||||
log.info("Detaching HEAD onto base: {}".format(base))
|
||||
try:
|
||||
base_path = args.base_path + base
|
||||
base = filter(lambda r: r.path == base_path, G.refs)[0]
|
||||
except IndexError:
|
||||
base = next(ref for ref in G.refs if ref.path == base_path)
|
||||
except StopIteration:
|
||||
log.error("Branch " + base + " does not exist!")
|
||||
sys.exit(1)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user