~allenap/maas/repackage

« back to all changes in this revision

Viewing changes to src/maasserver/management/commands/edit_named_options.py

[r=jtv][bug=][author=julian-edwards] Fix the management command edit_named_conf.  Previously it was setting up an 'include' statement pointing to the wrong path.

Show diffs side-by-side

added added

removed removed

Lines of Context:
81
81
 
82
82
    def set_up_include_statement(self, options_block, config_path):
83
83
        """Insert the 'include' directive into the iscpy-parsed options."""
84
 
        dir = os.path.dirname(config_path)
85
 
        options_block['include'] = '"%s/%s"' % (
86
 
            dir, MAAS_NAMED_CONF_OPTIONS_INSIDE_NAME)
 
84
        dir = os.path.join(os.path.dirname(config_path), "maas")
 
85
        options_block['include'] = '"%s%s%s"' % (
 
86
            dir, os.path.sep, MAAS_NAMED_CONF_OPTIONS_INSIDE_NAME)
87
87
 
88
88
    def remove_forwarders(self, options_block):
89
89
        """Remove existing forwarders from the options block.