From 5585b61cbeae2f0356b8476bd4256da39be0cc10 Mon Sep 17 00:00:00 2001 From: Scott Baker Date: Wed, 7 Jan 2009 01:50:28 +0000 Subject: [PATCH] change cli to use (type, hrn) instead of record in remove calls --- cmdline/genicli.py | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/cmdline/genicli.py b/cmdline/genicli.py index b54d4f7c..4101b5f0 100644 --- a/cmdline/genicli.py +++ b/cmdline/genicli.py @@ -335,20 +335,21 @@ def main(): result = client.register(cred, record) elif (opname == "remove"): - record_list = client.resolve(cred, hrn) - if not record_list: - print "no records match hrn" - - matching_records = [] - for record in record_list: - if record.get_type() == type: - matching_records.append(record) - - if not matching_records: - print "records match hrn, but no records match type" - - for record in matching_records: - client.remove(cred,record) + client.remove(cred, type, hrn) +# record_list = client.resolve(cred, hrn) +# if not record_list: +# print "no records match hrn" +# +# matching_records = [] +# for record in record_list: +# if record.get_type() == type: +# matching_records.append(record) +# +# if not matching_records: +# print "records match hrn, but no records match type" +# +# for record in matching_records: +# client.remove(cred, record) elif (opname == "update"): record_list = client.resolve(cred, hrn) -- 2.43.0