Changeset 2587 for trunk


Ignore:
Timestamp:
Dec 5, 2009, 5:08:49 PM (15 years ago)
Author:
broder
Message:

Config structs aren't dicts, so neither []-indexing nor .get work on
them.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/packages/invirt-dev/python/invirt/builder.py

    r2577 r2587  
    3232def pocketToGit(pocket):
    3333    """Map a pocket in the configuration to a git branch."""
    34     return config.git.pockets[pocket].get('git', pocket)
     34    return getattr(getattr(config.git.pockets, pocket), 'git', pocket)
    3535
    3636
    3737def pocketToApt(pocket):
    3838    """Map a pocket in the configuration to an apt repo pocket."""
    39     return config.git.pockets[pocket].get('apt', pocket)
     39    return getattr(getattr(config.git.pockets, pocket), 'apt', pocket)
    4040
    4141
Note: See TracChangeset for help on using the changeset viewer.