summaryrefslogtreecommitdiffstats
path: root/formats
diff options
context:
space:
mode:
authorJan Pokorný <jpokorny@redhat.com>2014-02-19 21:53:15 +0100
committerJan Pokorný <jpokorny@redhat.com>2014-02-19 21:53:15 +0100
commita63a644d452aadd5b3c3858fd526744f771ec37f (patch)
tree17db9c4c9bf0a48c848da4d26b4886d58c65d966 /formats
parent66593fd93c952fcd3c72e48d885578a8609606c1 (diff)
downloadclufter-a63a644d452aadd5b3c3858fd526744f771ec37f.tar.gz
clufter-a63a644d452aadd5b3c3858fd526744f771ec37f.tar.xz
clufter-a63a644d452aadd5b3c3858fd526744f771ec37f.zip
format + simpleconfig: prevent unneeded deepcopy (of tuple)
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
Diffstat (limited to 'formats')
-rw-r--r--formats/simpleconfig.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/formats/simpleconfig.py b/formats/simpleconfig.py
index 2a7cb1b..4bb970e 100644
--- a/formats/simpleconfig.py
+++ b/formats/simpleconfig.py
@@ -67,12 +67,13 @@ class simpleconfig(SimpleFormat):
two_node: 1
}
"""
- ret = super(simpleconfig, self).get_bytestring(self)
+ # try to look (indirectly) if we have a file at hand first
+ ret = super(simpleconfig, self).get_bytestring('bytestring')
if ret is not None:
return ret
# fallback
- struct = self('struct')
+ struct = self('struct', protect_safe=True)
indent, optindent = ('\t', ) * 2
lbrace, rbrace, optsep = '{', '}', ': '
# XXX previous apply_aggregation_preserving_passing_depth attempt