~james-w/udd/storm-sqlite

« back to all changes in this revision

Viewing changes to udd/iconfig.py

  • Committer: Vincent Ladeuil
  • Date: 2012-05-31 09:49:12 UTC
  • mfrom: (565.2.1 968506-bzr-26-compat)
  • Revision ID: v.ladeuil+lp@free.fr-20120531094912-8m0ptcc0h4pux1nh
Fix compat with bzr-2.6

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
import os
2
2
 
 
3
import bzrlib
3
4
from bzrlib import (
4
5
    config,
5
6
    transport,
53
54
                pkgimport_store.get_common_sections,
54
55
                ])
55
56
 
56
 
    def get(self, name, expand=True):
57
 
        """Override base class to expand by default."""
58
 
        return super(ImporterStack, self).get(name, expand)
 
57
    if bzrlib.version_info < (2,6):
 
58
        def get(self, name, expand=True):
 
59
            """Override base class to expand by default."""
 
60
            return super(ImporterStack, self).get(name, expand)
59
61
 
60
62
 
61
63
class PackageStack(config.Stack):
85
87
                pkgimport_store.get_common_sections,
86
88
                ])
87
89
 
88
 
    def get(self, name, expand=True):
89
 
        """Override base class to expand by default."""
90
 
        return super(PackageStack, self).get(name, expand)
 
90
    if bzrlib.version_info < (2,6):
 
91
        def get(self, name, expand=True):
 
92
            """Override base class to expand by default."""
 
93
            return super(PackageStack, self).get(name, expand)
91
94
 
92
95
def register_option(*args, **kwargs):
93
96
    config.option_registry.register(config.Option(*args, **kwargs))