summaryrefslogtreecommitdiffstats
path: root/cobbler
diff options
context:
space:
mode:
authorMichael DeHaan <mdehaan@redhat.com>2007-08-15 16:40:13 -0400
committerMichael DeHaan <mdehaan@redhat.com>2007-08-15 16:40:13 -0400
commitc34532d98aeae2e1401e3aff770782ab6871f19b (patch)
tree70dcb3e791cf69e04bfa3fb04df40f337b86f39f /cobbler
parente4311fe8b65082870eafc73453c3829a3f97cfa0 (diff)
downloadthird_party-cobbler-c34532d98aeae2e1401e3aff770782ab6871f19b.tar.gz
third_party-cobbler-c34532d98aeae2e1401e3aff770782ab6871f19b.tar.xz
third_party-cobbler-c34532d98aeae2e1401e3aff770782ab6871f19b.zip
If the cobbler system name is not in the Cobbler DB then just show the IP.
Diffstat (limited to 'cobbler')
-rw-r--r--cobbler/action_status.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/cobbler/action_status.py b/cobbler/action_status.py
index 660fb42..cc6ebd4 100644
--- a/cobbler/action_status.py
+++ b/cobbler/action_status.py
@@ -153,9 +153,12 @@ class BootStatusReport:
else:
entries[logtime] = "1"
- name = api.systems().find(ip_address=ip).name
- self.generate_report(entries,name)
+ obj = api.systems().find(ip_address=ip)
+ if obj is not None:
+ self.generate_report(entries,obj.name)
+ else:
+ self.generate_report(entries,ip)
return True