successful import of keyconfig dependant on current object context?
Closed, InvalidPublic

Description

1. Open the blend file and select the cube.
2. Go to user preferences, and import "keyconfig.py"
3. It works.
4. Select the armature.
5. Go to user preferences, and import "keyconfig.py" again.
6. The console prints:

keyconfig.py line 17 in module
kmi.properties.mode = 'VERTEX_PAINT'
TypeError: bpy_struct: item.attr = val: enum "VERTEX_PAINT" not found in ('OBJECT', 'EDIT', 'POSE')

Also, if you set the active object to None:

bpy.data.scenes['Scene'].objects.active = None

... and then import the keyconfig, it prints:
line 11
kmi.properties.mode = 'EDIT'
TypeError: bpy_struct: item.attr = val: enum "EDIT" not found in ()

Details

Type
Bug

Its' the same issue as http://projects.blender.org/tracker/index.php?func=detail&aid=30554&group_id=9&atid=498
Thanks for the report, but it's a duplicate :)