Revision: 3416
Author: KariHusa
Date: Mon May 24 05:12:04 2010
Log: Refactoring
http://code.google.com/p/robotframework/source/detail?r=3416

Modified:
 /trunk/src/robot/parsing/settings.py

=======================================
--- /trunk/src/robot/parsing/settings.py        Mon May 24 04:42:33 2010
+++ /trunk/src/robot/parsing/settings.py        Mon May 24 05:12:04 2010
@@ -44,6 +44,10 @@
     def _string_value(self, value):
         return value if isinstance(value, basestring) else ' '.join(value)

+    def _concat_string_with_value(self, str, value):
+        str_val = self._string_value(value)
+        str += str_val if not str else ' ' + str_val
+        return str

 class Documentation(_Setting):

@@ -51,8 +55,7 @@
         self.value = ''

     def _set(self, value):
-        str_val = self._string_value(value)
-        self.value += str_val if not self.value else ' ' + str_val
+        self.value = self._concat_string_with_value(self.value, value)


 class Fixture(_Setting):
@@ -81,8 +84,7 @@
         if not self.value:
             self.value = value[0] if value else ''
             value = value[1:]
-        str_val = self._string_value(value)
-        self.message += str_val if not self.message else ' ' + str_val
+        self.message = self._concat_string_with_value(self.message, value)


 class Tags(_Setting):

Reply via email to