Skip to content

Commit 503a5f2

Browse files
committed
cli: Get rid of deprecated sets, go functional, use filter()
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
1 parent 67f9467 commit 503a5f2

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

‎tools/cli/cloudmonkey/cloudmonkey.py‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
import logging
2727
import os
2828
import pdb
29-
import sets
3029
import shlex
3130
import sys
3231
import time
@@ -332,8 +331,8 @@ def default(self, args):
332331
setattr(api_cmd, attribute, args_dict[attribute])
333332

334333
command = api_cmd()
335-
missing_args = list(sets.Set(command.required).difference(
336-
sets.Set(args_dict.keys())))
334+
missing_args = filter(lambda x: x not in args_dict.keys(),
335+
command.required)
337336

338337
if len(missing_args) > 0:
339338
self.print_shell("Missing arguments:", ' '.join(missing_args))

0 commit comments

Comments
 (0)