Skip to content

Commit

Permalink
Merge pull request #151 from jimi1283/master
Browse files Browse the repository at this point in the history
BUGFIX - rename failed for distros that did not live under ks_mirror and Makefile for testing
  • Loading branch information
jimi-c committed Apr 26, 2012
2 parents 9befd7b + be06b5f commit 2d628f5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion Makefile
Expand Up @@ -28,9 +28,10 @@ test:
/sbin/service cobblerd restart
-(make nosetests)
make restorestate prefix=test
/sbin/service cobblerd restart

nosetests:
nosetests cobbler/*.py -v | tee test.log
nosetests cobbler/*.py -v 2>&1 | tee test.log

build:
python setup.py build -f
Expand Down
4 changes: 3 additions & 1 deletion cobbler/utils.py
Expand Up @@ -2129,7 +2129,9 @@ def find_distro_path(settings, distro):
for dir in possible_dirs:
if os.path.dirname(distro.kernel).find(dir) != -1:
return os.path.join(settings.webdir, "ks_mirror", dir)
return None
# non-standard directory, assume it's the same as the
# directory in which the given distro's kernel is
return os.path.dirname(distro.kernel)

if __name__ == "__main__":
print os_release() # returns 2, not 3
Expand Down

0 comments on commit 2d628f5

Please sign in to comment.