From ffb6b42d5da48733179ffdf71d8eecdd9292c563 Mon Sep 17 00:00:00 2001 From: Daid Date: Sat, 28 Apr 2012 18:32:34 +0200 Subject: [PATCH] Fixed #82 --- Cura/util/profile.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) 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 -- 2.30.2