From 9d6e6241954d001a5b49e4ea9a48c10e2a792958 Mon Sep 17 00:00:00 2001 From: "Chris St. Pierre" Date: Mon, 10 Dec 2012 17:19:54 -0600 Subject: generate XML schema docs from XML schemas themselves --- src/lib/Bcfg2/Client/Tools/POSIX/Hardlink.py | 1 + src/lib/Bcfg2/Client/Tools/VCS.py | 7 +------ src/lib/Bcfg2/Server/Plugins/Metadata.py | 12 +++++------- 3 files changed, 7 insertions(+), 13 deletions(-) (limited to 'src') diff --git a/src/lib/Bcfg2/Client/Tools/POSIX/Hardlink.py b/src/lib/Bcfg2/Client/Tools/POSIX/Hardlink.py index 64a0b1e15..896ca5f49 100644 --- a/src/lib/Bcfg2/Client/Tools/POSIX/Hardlink.py +++ b/src/lib/Bcfg2/Client/Tools/POSIX/Hardlink.py @@ -12,4 +12,5 @@ class POSIXHardlink(POSIXLinkTool): return os.path.samefile(entry.get('name'), entry.get('to')) def _link(self, entry): + ## TODO: set permissions return os.link(entry.get('to'), entry.get('name')) diff --git a/src/lib/Bcfg2/Client/Tools/VCS.py b/src/lib/Bcfg2/Client/Tools/VCS.py index 6c4c77426..fa3d22e1d 100644 --- a/src/lib/Bcfg2/Client/Tools/VCS.py +++ b/src/lib/Bcfg2/Client/Tools/VCS.py @@ -28,7 +28,6 @@ import Bcfg2.Client.Tools class VCS(Bcfg2.Client.Tools.Tool): """VCS support.""" - name = 'VCS' __handles__ = [('Path', 'vcs')] __req__ = {'Path': ['name', 'type', @@ -36,10 +35,6 @@ class VCS(Bcfg2.Client.Tools.Tool): 'sourceurl', 'revision']} - def __init__(self, logger, cfg, setup): - Bcfg2.Client.Tools.Tool.__init__(self, logger, cfg, setup) - self.cfg = cfg - def git_write_index(self, entry): """Write the git index""" pass @@ -72,7 +67,7 @@ class VCS(Bcfg2.Client.Tools.Tool): else: os.remove(destname) except OSError: - self.logger.info('Failed to remove %s' % \ + self.logger.info('Failed to remove %s' % destname) return False diff --git a/src/lib/Bcfg2/Server/Plugins/Metadata.py b/src/lib/Bcfg2/Server/Plugins/Metadata.py index 0ab72f2c5..5519d42b5 100644 --- a/src/lib/Bcfg2/Server/Plugins/Metadata.py +++ b/src/lib/Bcfg2/Server/Plugins/Metadata.py @@ -358,15 +358,15 @@ class MetadataGroup(tuple): """ representation of a metadata group. basically just a named tuple """ # pylint: disable=R0913,W0613 - def __new__(cls, name, bundles=None, category=None, - is_profile=False, is_public=False, is_private=False): + def __new__(cls, name, bundles=None, category=None, is_profile=False, + is_public=False): if bundles is None: bundles = set() return tuple.__new__(cls, (bundles, category)) # pylint: enable=W0613 - def __init__(self, name, bundles=None, category=None, - is_profile=False, is_public=False, is_private=False): + def __init__(self, name, bundles=None, category=None, is_profile=False, + is_public=False): if bundles is None: bundles = set() tuple.__init__(self) @@ -375,7 +375,6 @@ class MetadataGroup(tuple): self.category = category self.is_profile = is_profile self.is_public = is_public - self.is_private = is_private # record which clients we've warned about category suppression self.warned = [] # pylint: enable=R0913 @@ -795,8 +794,7 @@ class Metadata(Bcfg2.Server.Plugin.Metadata, for b in grp.findall("Bundle")], category=grp.get("category"), is_profile=grp.get("profile", "false") == "true", - is_public=grp.get("public", "false") == "true", - is_private=grp.get("public", "true") == "false") + is_public=grp.get("public", "false") == "true") if grp.get('default', 'false') == 'true': self.default = grp.get('name') -- cgit v1.2.3-1-g7c22