[Bf-extensions-cvs] [0c5b35f] master: Simplify list expression and add license

Campbell Barton noreply at git.blender.org
Thu Jul 9 14:20:34 CEST 2015


Commit: 0c5b35fda451b6607d348abd0cf199217844004f
Author: Campbell Barton
Date:   Thu Jul 9 22:15:24 2015 +1000
Branches: master
https://developer.blender.org/rBA0c5b35fda451b6607d348abd0cf199217844004f

Simplify list expression and add license

===================================================================

M	system_demo_mode/config.py

===================================================================

diff --git a/system_demo_mode/config.py b/system_demo_mode/config.py
index 7411112..131b5fc 100644
--- a/system_demo_mode/config.py
+++ b/system_demo_mode/config.py
@@ -1,3 +1,23 @@
+# ##### BEGIN GPL LICENSE BLOCK #####
+#
+#  This program is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU General Public License
+#  as published by the Free Software Foundation; either version 2
+#  of the License, or (at your option) any later version.
+#
+#  This program is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#  GNU General Public License for more details.
+#
+#  You should have received a copy of the GNU General Public License
+#  along with this program; if not, write to the Free Software Foundation,
+#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# ##### END GPL LICENSE BLOCK #####
+
+# <pep8 compliant>
+
 import os
 
 
@@ -37,17 +57,18 @@ def as_string(dirpath, random_order, exit, **kwargs):
     cfg, dirpath = generate(dirpath, random_order, **kwargs)
 
     # hint for reader, can be used if files are not found.
-    cfg_str = []
-    cfg_str += ["# generated file\n"]
-    cfg_str += ["\n"]
-    cfg_str += ["# edit the search path so other systems may find the files below\n"]
-    cfg_str += ["# based on name only if the absolute paths cant be found\n"]
-    cfg_str += ["# Use '//' for current blend file path.\n"]
-    cfg_str += ["\n"]
-    cfg_str += ["search_path = %r\n" % dirpath]
-    cfg_str += ["\n"]
-    cfg_str += ["exit = %r\n" % exit]
-    cfg_str += ["\n"]
+    cfg_str = [
+        "# generated file\n",
+        "\n",
+        "# edit the search path so other systems may find the files below\n",
+        "# based on name only if the absolute paths cant be found\n",
+        "# Use '//' for current blend file path.\n",
+        "\n",
+        "search_path = %r\n" % dirpath,
+        "\n",
+        "exit = %r\n" % exit,
+        "\n",
+        ]
 
     # All these work but use nicest formatting!
     if 0:  # works but not nice to edit.



More information about the Bf-extensions-cvs mailing list