From: Daid Date: Sat, 28 Apr 2012 16:32:34 +0000 (+0200) Subject: Fixed #82 X-Git-Tag: RC3~13^2~14 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=ffb6b42d5da48733179ffdf71d8eecdd9292c563;p=cura.git Fixed #82 --- diff --git a/Cura/util/profile.py b/Cura/util/profile.py index 419724cb..b7450a6c 100644 --- a/Cura/util/profile.py +++ b/Cura/util/profile.py @@ -177,10 +177,12 @@ def getGlobalProfileString(): p = [] alt = [] - for key in globalProfileParser.options('profile'): - p.append(key + "=" + globalProfileParser.get('profile', key)) - for key in globalProfileParser.options('alterations'): - alt.append(key + "=" + globalProfileParser.get('alterations', key)) + if globalProfileParser.has_section('profile'): + for key in globalProfileParser.options('profile'): + p.append(key + "=" + globalProfileParser.get('profile', key)) + if globalProfileParser.has_section('alterations'): + for key in globalProfileParser.options('alterations'): + alt.append(key + "=" + globalProfileParser.get('alterations', key)) ret = '\b'.join(p) + '\f' + '\b'.join(alt) ret = base64.b64encode(zlib.compress(ret, 9)) return ret