summaryrefslogtreecommitdiffstats
path: root/format.py
diff options
context:
space:
mode:
authorJan Pokorný <jpokorny@redhat.com>2014-06-18 18:37:03 +0200
committerJan Pokorný <jpokorny@redhat.com>2014-06-18 18:37:03 +0200
commitf2a867ab550612e6539a7515f2a11d3a9daae7b9 (patch)
tree500dc118975641c4bec0a49578b9d960832c0cb0 /format.py
parent503cd9ed9b18fcc1bbcae17e8d2f7d38ee7018d4 (diff)
downloadclufter-f2a867ab550612e6539a7515f2a11d3a9daae7b9.tar.gz
clufter-f2a867ab550612e6539a7515f2a11d3a9daae7b9.tar.xz
clufter-f2a867ab550612e6539a7515f2a11d3a9daae7b9.zip
format: turn needless per-module constant to per-class one
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
Diffstat (limited to 'format.py')
-rw-r--r--format.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/format.py b/format.py
index afd2209..7cb7427 100644
--- a/format.py
+++ b/format.py
@@ -30,7 +30,6 @@ from .utils import arg2wrapped, args2tuple, args2unwrapped, \
from .utils_xml import rng_get_start, rng_pivot
log = getLogger(__name__)
-MAX_DEPTH = 1000
DEFAULT_ROOT_DIR = join(dirname(__file__), 'formats')
@@ -364,6 +363,9 @@ class CompositeFormat(Format, MetaPlugin):
class XML(SimpleFormat):
""""Base for XML-based configuration formats"""
+
+ MAX_DEPTH = 1000
+
@classproperty
def root(self):
"""Root tag of the XML document"""
@@ -476,7 +478,7 @@ class XML(SimpleFormat):
continue # files are terminals anyway
current_tracking[name] = (swag, {})
- for i in xrange(MAX_DEPTH):
+ for i in xrange(cls.MAX_DEPTH):
if cls._walk_schema_step_up(tree_stack) is result:
return result
else: