cobbler/cobbler — Issue #93: cobbler/pxegen.py:make_actual_pxe_menu broken if there are images
Author: smoser
Created: 2012-03-07 20:35:49+00:00
State: open

to reproduce this, just go to your web UI and add an image. You can give it '/etc/passwd' for file (it doens't really matter), and then try to 'cobbler sync'.

make_actual_pxe_menu does:
```python
# image names towards the bottom
for image in image_list:
if os.path.exists(image.file):
contents = self.write_pxe_file(filename=None, system=None,
profile=None, distro=None, arch=image.arch, image=image)
if contents is not None:
pxe_menu_items = pxe_menu_items + contents + "\n"
```

The key point there is 'write_pxe_file' is called with 'distro=None'.

write_pxe_file will then stack trace on
```python
if distro.os_version.startswith("esxi") and filename is not None
```

This was originally seen in ubuntu at http://pad.lv/943000 .