~bac/charmworld/readme-mega

« back to all changes in this revision

Viewing changes to charmworld/models.py

  • Committer: Brad Crittenden
  • Date: 2013-09-09 19:01:30 UTC
  • mfrom: (386.1.7 readme)
  • Revision ID: bac@canonical.com-20130909190130-2javw980984xnjo6
Charmworld redesign.  Support bundle README files.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1426
1426
            return None
1427
1427
        return fs.get(hashes[filename])
1428
1428
 
 
1429
    def get_file_list(self, db, fs=None):
 
1430
        if fs is None:
 
1431
            fs = Bundle.getfs(db)
 
1432
        basket = db.baskets.find_one(self.basket_id)
 
1433
        if basket is None:
 
1434
            return []
 
1435
        hashes = unquote_yaml(basket.get('file_hashes', {}))
 
1436
        return hashes.keys()
 
1437
 
1429
1438
 
1430
1439
def acquire_session_secret(database):
1431
1440
    """Return a secret to use for AuthTkt sessions.