File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -108,7 +108,7 @@ def launch_status(request):
108
108
if response .get ("error" , "" ):
109
109
# If a key got created, allow the user to download it even if
110
110
# an error was encountered.
111
- if response [ 'kp_material' ] :
111
+ if response . get ( 'kp_material' ) :
112
112
request .session ['ec2data' ]['kp_name' ] = response ['kp_name' ]
113
113
request .session ['ec2data' ]['kp_material' ] = response ['kp_material' ]
114
114
r ['kp_name' ] = response ['kp_name' ]
@@ -129,7 +129,7 @@ def launch_status(request):
129
129
r ['instance_id' ] = response ['instance_id' ]
130
130
r ['sg_name' ] = response ['sg_names' ][0 ]
131
131
r ['kp_name' ] = response ['kp_name' ]
132
- r ['kp_material' ] = response [ 'kp_material' ]
132
+ r ['kp_material' ] = response . get ( 'kp_material' , '' )
133
133
r ['image_id' ] = response ['image_id' ]
134
134
135
135
# Add an entry to the Usage table now
You can’t perform that action at this time.
0 commit comments