From 3aa534f31e4aa373959516853dd20f017b077dd8 Mon Sep 17 00:00:00 2001 From: TeamSpen210 Date: Wed, 23 Dec 2015 15:46:43 +1000 Subject: [PATCH] Get rid of out_val variable in Property.export() --- src/property_parser.py | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/src/property_parser.py b/src/property_parser.py index d0bad2bee..58a875d1d 100644 --- a/src/property_parser.py +++ b/src/property_parser.py @@ -606,25 +606,20 @@ def export(self): Recursively calls itself for all child properties. If the Property is marked invalid, it will immediately return. """ - out_val = '"' + str(self.real_name) + '"' if isinstance(self.value, list): if self.name is None: # If the name is None, we just output the chilren # without a "Name" { } surround. These Property # objects represent the root. - yield from ( - line - for prop in self.value - for line in prop.export() - ) + for prop in self.value: + yield from prop.export() else: - yield out_val + '\n' yield '\t{\n' yield from ( - '\t'+line + '\t' + line for prop in self.value for line in prop.export() ) yield '\t}\n' else: - yield out_val + ' "' + str(self.value) + '"\n' + yield '"' + self.real_name + '" "' + str(self.value) + '"\n'