Address comments on 058b5a802f

Also address some from 67b1857e58 which got left out of the previous
commit
This commit is contained in:
Ellwood Zwovic
2017-07-14 19:22:53 -07:00
parent 678ab8cadf
commit ae5fe0abcf
2 changed files with 34 additions and 32 deletions

View File

@@ -340,7 +340,13 @@ class USERPREF_PT_packages(bpy.types.Panel):
return (userpref.active_section == 'PACKAGES')
def draw(self, context):
repo = context.user_preferences.addons[__package__].preferences['repo']
try:
repo = context.user_preferences.addons[__package__].preferences['repo']
except KeyError:
# HACK:
# If no repositories are initialized, we should try to refresh them. If that doesn't work, display a message
repo = {'packages': []}
layout = self.layout
main = layout.row()