X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=wizard%2Fbertos_utils.py;h=e361b3c446ec5ebc212c1d7dee71a68b822ed912;hb=7ab0db65df07943ccdac8fce7e35c360767033ff;hp=465808aaf657fb26f28240a7e85f44083f6c93e2;hpb=46cd7a45ea505ac9bb18d410e349b9553c95457a;p=bertos.git diff --git a/wizard/bertos_utils.py b/wizard/bertos_utils.py index 465808aa..e361b3c4 100644 --- a/wizard/bertos_utils.py +++ b/wizard/bertos_utils.py @@ -52,7 +52,13 @@ from _wizard_version import WIZARD_VERSION from LoadException import VersionException, ToolchainException def _cmp(x, y): - return cmp(x["info"].get('ord', 0), y["info"].get('ord', 0)) + result = cmp(x["info"].get('ord', 0), y["info"].get('ord', 0)) + if result == 0: + result = cmp( + x["info"].get("name", x["info"]["filename"]).lower(), + y["info"].get("name", y["info"]["filename"]).lower() + ) + return result def isBertosDir(directory): return os.path.exists(directory + "/VERSION")