[PATCH] esx: Refactor a repeated string in the generator

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



---
 src/esx/esx_vi_generator.py |   24 +++++++++++++-----------
 1 files changed, 13 insertions(+), 11 deletions(-)

diff --git a/src/esx/esx_vi_generator.py b/src/esx/esx_vi_generator.py
index 239ec73..8a128df 100755
--- a/src/esx/esx_vi_generator.py
+++ b/src/esx/esx_vi_generator.py
@@ -1817,17 +1817,19 @@ for obj in managed_objects_by_name.values():
 
 
 
-types_typedef.write("/* Generated by esx_vi_generator.py */\n\n\n\n")
-types_typeenum.write("/* Generated by esx_vi_generator.py */\n\n")
-types_typetostring.write("/* Generated by esx_vi_generator.py */\n\n")
-types_typefromstring.write("/* Generated by esx_vi_generator.py */\n\n")
-types_header.write("/* Generated by esx_vi_generator.py */\n\n\n\n")
-types_source.write("/* Generated by esx_vi_generator.py */\n\n\n\n")
-methods_header.write("/* Generated by esx_vi_generator.py */\n\n\n\n")
-methods_source.write("/* Generated by esx_vi_generator.py */\n\n\n\n")
-methods_macro.write("/* Generated by esx_vi_generator.py */\n\n\n\n")
-helpers_header.write("/* Generated by esx_vi_generator.py */\n\n\n\n")
-helpers_source.write("/* Generated by esx_vi_generator.py */\n\n\n\n")
+notice = "/* Generated by esx_vi_generator.py */\n\n\n\n"
+
+types_typedef.write(notice)
+types_typeenum.write(notice)
+types_typetostring.write(notice)
+types_typefromstring.write(notice)
+types_header.write(notice)
+types_source.write(notice)
+methods_header.write(notice)
+methods_source.write(notice)
+methods_macro.write(notice)
+helpers_header.write(notice)
+helpers_source.write(notice)
 
 
 
-- 
1.7.4.1

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]