Skip to content

Commit 7ad527a

Browse files
authored
Merge pull request #60 from onekey-sec/fix-example
fix(examples): fix type of tenants variable
2 parents 836fd0e + 34b499c commit 7ad527a

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

examples/get_tenant_token.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@
1717

1818
if len(sys.argv) > 2:
1919
# Filter tenants that matches the provided pattern
20-
tenants = filter(lambda tenant: sys.argv[2] in tenant.name, tenants)
20+
pattern = sys.argv[2]
21+
tenants = [t for t in tenants if pattern in t.name]
2122

2223
# Pick the first one
2324
tenant = tenants[0]

0 commit comments

Comments
 (0)