Skip to content

Commit cc549d1

Browse files
committed
Use record_type instead of only type since this is a built
1 parent 4b1fa0e commit cc549d1

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

SoftLayer/CLI/dns/record_add.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -69,22 +69,22 @@ def cli(env, record, type, data, zone, ttl, priority, protocol, port, service, w
6969
"""
7070

7171
manager = SoftLayer.DNSManager(env.client)
72-
type = type.upper()
72+
record_type = type.upper()
7373

74-
if zone and type != 'PTR':
74+
if zone and record_type != 'PTR':
7575
zone_id = helpers.resolve_id(manager.resolve_ids, zone, name='zone')
7676

77-
if type == 'MX':
77+
if record_type == 'MX':
7878
manager.create_record_mx(zone_id, record, data, ttl=ttl, priority=priority)
79-
elif type == 'SRV':
79+
elif record_type == 'SRV':
8080
manager.create_record_srv(zone_id, record, data, protocol, port, service,
8181
ttl=ttl, priority=priority, weight=weight)
8282
else:
83-
manager.create_record(zone_id, record, type, data, ttl=ttl)
83+
manager.create_record(zone_id, record, record_type, data, ttl=ttl)
8484

85-
elif type == 'PTR':
85+
elif record_type == 'PTR':
8686
manager.create_record_ptr(record, data, ttl=ttl)
8787
else:
88-
raise exceptions.CLIAbort("%s isn't a valid record type or zone is missing" % (type))
88+
raise exceptions.CLIAbort("%s isn't a valid record type or zone is missing" % record_type)
8989

90-
click.secho("%s record added successfully" % (type), fg='green')
90+
click.secho("%s record added successfully" % record_type, fg='green')

0 commit comments

Comments
 (0)