From: daid Date: Tue, 15 May 2012 07:34:45 +0000 (+0200) Subject: Fixed bug which happens if you slice without ever touching the start/end code. X-Git-Tag: RC4~24 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=e22694bfda39f2a12e14f1292710ff180988c719;p=cura.git Fixed bug which happens if you slice without ever touching the start/end code. --- diff --git a/Cura/util/profile.py b/Cura/util/profile.py index fd4d1ed7..c85f9021 100644 --- a/Cura/util/profile.py +++ b/Cura/util/profile.py @@ -190,11 +190,13 @@ def loadGlobalProfileFromString(options): options = zlib.decompress(options) (profileOpts, alt) = options.split('\f', 1) for option in profileOpts.split('\b'): - (key, value) = option.split('=', 1) - globalProfileParser.set('profile', key, value) + if len(option) > 0: + (key, value) = option.split('=', 1) + globalProfileParser.set('profile', key, value) for option in alt.split('\b'): - (key, value) = option.split('=', 1) - globalProfileParser.set('alterations', key, value) + if len(option) > 0: + (key, value) = option.split('=', 1) + globalProfileParser.set('alterations', key, value) def getGlobalProfileString(): global globalProfileParser