\r
p = []\r
alt = []\r
- for key in globalProfileParser.options('profile'):\r
- p.append(key + "=" + globalProfileParser.get('profile', key))\r
- for key in globalProfileParser.options('alterations'):\r
- alt.append(key + "=" + globalProfileParser.get('alterations', key))\r
+ if globalProfileParser.has_section('profile'):\r
+ for key in globalProfileParser.options('profile'):\r
+ p.append(key + "=" + globalProfileParser.get('profile', key))\r
+ if globalProfileParser.has_section('alterations'):\r
+ for key in globalProfileParser.options('alterations'):\r
+ alt.append(key + "=" + globalProfileParser.get('alterations', key))\r
ret = '\b'.join(p) + '\f' + '\b'.join(alt)\r
ret = base64.b64encode(zlib.compress(ret, 9))\r
return ret\r