~davidc3/ubuntu-rest-scopes/stackexchange-askubuntu

« back to all changes in this revision

Viewing changes to src/rest_scopes.py

  • Committer: Tarmac
  • Author(s): Facundo Batista
  • Date: 2014-02-20 15:22:03 UTC
  • mfrom: (46.1.1 fix-icon-arts)
  • Revision ID: tarmac-20140220152203-ooclh9orca5jtl6u
[r=verterok] Icons and art as separate images in the remote scopes listing.

Show diffs side-by-side

added added

removed removed

Lines of Context:
59
59
            try:
60
60
                icon_fname = data['icon']
61
61
            except KeyError:
62
 
                icon_art = None
63
 
            else:
64
 
                icon_art = os.path.join(config['base_image_url'], icon_fname)
 
62
                icon_img = None
 
63
            else:
 
64
                icon_img = os.path.join(config['base_image_url'], icon_fname)
 
65
            try:
 
66
                art_fname = data['art']
 
67
            except KeyError:
 
68
                art_img = None
 
69
            else:
 
70
                art_img = os.path.join(config['base_image_url'], art_fname)
65
71
            scope_info.append({
66
72
                'id': fqdn if fqdn else scope_id,
67
73
                'name': data['name'].strip(),
68
74
                'description': data['description'].strip(),
69
75
                'base_url': base_url,
70
76
                'invisible': data['invisible'],
71
 
                'icon': icon_art,
72
 
                'art': icon_art,
 
77
                'icon': icon_img,
 
78
                'art': art_img,
73
79
            })
74
80
            if internal:
75
81
                package = data.get('mod_package', config['scopes_package'])