From: Scott Baker Date: Wed, 7 Jan 2009 01:50:28 +0000 (+0000) Subject: change cli to use (type, hrn) instead of record in remove calls X-Git-Tag: sfa-0.9-0@14641~763 X-Git-Url: http://git.onelab.eu/?p=sfa.git;a=commitdiff_plain;h=5585b61cbeae2f0356b8476bd4256da39be0cc10 change cli to use (type, hrn) instead of record in remove calls --- 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)