cobbler/cobbler — pull request #119 by jimi1283 (2012-04-05 05:41:09+00:00)
Title: Fix for issue #17 - Make cobbler import be more squeaky when it doesn't import anything

Task will now fail and return code will be 1 if no new distros are added.

Example:

$ cobbler import --name=sl6.1 --path=/data/test/
task started: 2012-04-04_233518_import
task started (id=Media import, time=Wed Apr 4 23:35:18 2012)
Found a redhat compatible signature: Packages
adding distros
- Warning : Multiple archs found : ['x86_64', 'i386']
skipping import, as distro name already exists: sl6.1-x86_64
skipping import, as distro name already exists: sl6.1-i386
No distros imported, bailing out
!!! TASK FAILED !!!

$ echo $?
1