summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--schemas/pathentry.xsd6
-rwxr-xr-xsetup.py14
-rw-r--r--src/lib/Server/Plugins/Cfg.py12
3 files changed, 23 insertions, 9 deletions
diff --git a/schemas/pathentry.xsd b/schemas/pathentry.xsd
index 21a417125..080758d0b 100644
--- a/schemas/pathentry.xsd
+++ b/schemas/pathentry.xsd
@@ -29,6 +29,12 @@
<xsd:attribute type='xsd:string' name='sensitive' use='optional'/>
<xsd:attribute type='xsd:string' name='to' use='optional'/>
<xsd:attribute type='xsd:string' name='type' use='optional'/>
+ <!-- device attributes -->
+ <xsd:attribute type='xsd:string' name='dev_type' use='optional'/>
+ <xsd:attribute type='xsd:string' name='major' use='optional'/>
+ <xsd:attribute type='xsd:string' name='minor' use='optional'/>
+ <xsd:attribute type='xsd:string' name='mode' use='optional'/>
+ <!-- end device attributes -->
<xsd:attributeGroup ref="py:genshiAttrs"/>
</xsd:complexType>
</xsd:schema>
diff --git a/setup.py b/setup.py
index ece7b4a24..69c67c0b1 100755
--- a/setup.py
+++ b/setup.py
@@ -8,6 +8,12 @@ import os
import os.path
import sys
+# we only need m2crypto on < python2.6
+need_m2crypto = False
+version = sys.version_info[:2]
+if version < (2, 6):
+ need_m2crypto = True
+
class BuildDTDDoc (Command):
"""Build DTD documentation"""
@@ -119,6 +125,10 @@ py3lib = 'src/lib/Bcfg2Py3Incompat.py'
if sys.hexversion < 0x03000000 and os.path.exists(py3lib):
os.remove(py3lib)
+inst_reqs = ["lxml"]
+if need_m2crypto:
+ inst_reqs.append("M2Crypto")
+
setup(cmdclass=cmdclass,
name="Bcfg2",
version="1.2.2",
@@ -140,9 +150,7 @@ setup(cmdclass=cmdclass,
"Bcfg2.Server.Reports.reports.templatetags",
"Bcfg2.Server.Snapshots",
],
- install_requires = ["lxml",
- "M2Crypto",
- ],
+ install_requires = inst_reqs,
package_dir = {'Bcfg2': 'src/lib'},
package_data = {'Bcfg2.Server.Reports.reports':['fixtures/*.xml',
'templates/*.html', 'templates/*/*.html',
diff --git a/src/lib/Server/Plugins/Cfg.py b/src/lib/Server/Plugins/Cfg.py
index 917f27e20..c3e807d7a 100644
--- a/src/lib/Server/Plugins/Cfg.py
+++ b/src/lib/Server/Plugins/Cfg.py
@@ -102,7 +102,7 @@ class CfgEntrySet(Bcfg2.Server.Plugin.EntrySet):
def debug_log(self, message, flag=None):
if (flag is None and self.debug_flag) or flag:
- self.logger.error(message)
+ logger.error(message)
def sort_by_specific(self, one, other):
return cmp(one.specific, other.specific)
@@ -227,15 +227,15 @@ class CfgEntrySet(Bcfg2.Server.Plugin.EntrySet):
if 'text' in new_entry:
name = self.build_filename(specific)
if os.path.exists("%s.genshi" % name):
- self.logger.error("Cfg: Unable to pull data for genshi types")
+ logger.error("Cfg: Unable to pull data for genshi types")
raise Bcfg2.Server.Plugin.PluginExecutionError
elif os.path.exists("%s.cheetah" % name):
- self.logger.error("Cfg: Unable to pull data for cheetah types")
+ logger.error("Cfg: Unable to pull data for cheetah types")
raise Bcfg2.Server.Plugin.PluginExecutionError
try:
etext = new_entry['text'].encode(self.encoding)
except:
- self.logger.error("Cfg: Cannot encode content of %s as %s" % (name, self.encoding))
+ logger.error("Cfg: Cannot encode content of %s as %s" % (name, self.encoding))
raise Bcfg2.Server.Plugin.PluginExecutionError
open(name, 'w').write(etext)
self.debug_log("Wrote file %s" % name, flag=log)
@@ -244,11 +244,11 @@ class CfgEntrySet(Bcfg2.Server.Plugin.EntrySet):
if badattr:
# check for info files and inform user of their removal
if os.path.exists(self.path + "/:info"):
- self.logger.info("Removing :info file and replacing with "
+ logger.info("Removing :info file and replacing with "
"info.xml")
os.remove(self.path + "/:info")
if os.path.exists(self.path + "/info"):
- self.logger.info("Removing info file and replacing with "
+ logger.info("Removing info file and replacing with "
"info.xml")
os.remove(self.path + "/info")
metadata_updates = {}