Skip to content

Commit 3ceffdf

Browse files
authored
CLI: Remove the trailing comma (#2863)
1 parent f151f40 commit 3ceffdf

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

client/python/cli/command/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def options_get(key, f=lambda x: x):
4040
set_properties = Parser.parse_properties(options_get(Arguments.SET_PROPERTY))
4141
remove_properties = options_get(Arguments.REMOVE_PROPERTY)
4242
catalog_client_scopes = options_get(Arguments.CATALOG_CLIENT_SCOPE)
43-
parameters = Parser.parse_properties(options_get(Arguments.PARAMETERS)),
43+
parameters = Parser.parse_properties(options_get(Arguments.PARAMETERS))
4444

4545
command = None
4646
if options.command == Commands.CATALOGS:

client/python/test/test_cli_parsing.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -618,6 +618,17 @@ def get(obj, arg_string):
618618
(1, 'client_secret'): 'e469c048cf866dfae469c048cf866df1',
619619
})
620620

621+
def test_policies_attach_parameters_parsed_to_dict(self):
622+
options = Parser.parse([
623+
'policies', 'attach', 'policy-name',
624+
'--catalog', 'cat',
625+
'--attachment-type', 'catalog',
626+
'--parameters', 'key=value',
627+
])
628+
command = Command.from_options(options)
629+
self.assertIsInstance(command.parameters, dict)
630+
self.assertEqual({'key': 'value'}, command.parameters)
631+
621632

622633
if __name__ == '__main__':
623-
unittest.main()
634+
unittest.main()

0 commit comments

Comments
 (0)