Re: cobbler broken with python < 2.4

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hennessey Daniel wrote:
Hey,
just upgraded cobbler to 0.5 and now it doesn't work. I get; cobbler
Traceback (most recent call last):
File "/usr/lib/python2.3/site-packages/cobbler/cobbler.py", line 719, in main
    BootCLI(sys.argv).run()
File "/usr/lib/python2.3/site-packages/cobbler/cobbler.py", line 42, in __init__
    self.api = api.BootAPI()
File "/usr/lib/python2.3/site-packages/cobbler/api.py", line 40, in __init__
    self.deserialize()
File "/usr/lib/python2.3/site-packages/cobbler/api.py", line 170, in deserialize
    return self._config.deserialize()
File "/usr/lib/python2.3/site-packages/cobbler/config.py", line 169, in deserialize
    if not serializer.deserialize(x,topological=True):
File "/usr/lib/python2.3/site-packages/cobbler/serializer.py", line 79, in deserialize
    datastruct.sort(cmp=__depth_cmp)
TypeError: sort() takes no keyword arguments
I assume that this is because the sort() function in older versions of python does not expect parameters.

Sorry about that. If you're using git, do a "git pull", and I've already pushed the fix...

diff --git a/cobbler/serializer.py b/cobbler/serializer.py
index d35bdb1..b1161d1 100644
--- a/cobbler/serializer.py
+++ b/cobbler/serializer.py
@@ -76,7 +76,7 @@ def deserialize(obj,topological=False):
# if the depth were 0. It will be assigned a proper depth at serializat # time. This is a bit cleaner implementation wise than a topological so
       # though that would make a shiny upgrade.
-       datastruct.sort(cmp=__depth_cmp)
+       datastruct.sort(__depth_cmp)
    obj.from_datastruct(datastruct)
    return True

--Michael

_______________________________________________
et-mgmt-tools mailing list
et-mgmt-tools@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/et-mgmt-tools

[Index of Archives]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux