aboutsummaryrefslogtreecommitdiffstats
path: root/deploy/adapters/cobbler/triggers
diff options
context:
space:
mode:
authorbaigk <baiguoku@huawei.com>2015-08-04 22:21:43 -0400
committerbaigk <baiguoku@huawei.com>2015-08-05 01:01:22 -0400
commitd05b5f04c92034eae1675dc8102247a3cc3315f7 (patch)
tree9721a1cfddc4b234ff302922da01cc3da0eb0fb9 /deploy/adapters/cobbler/triggers
parent79b571dae951ba9bfe36440750c1a1408b19cd69 (diff)
delete the windows newline character
JIRA: COMPASS-7 Change-Id: Iffd549877b8cc50a995bdc59adf1f05c0fcb1d5e Signed-off-by: baigk <baiguoku@huawei.com>
Diffstat (limited to 'deploy/adapters/cobbler/triggers')
-rw-r--r--deploy/adapters/cobbler/triggers/sync/post/migrate_ks.py58
1 files changed, 29 insertions, 29 deletions
diff --git a/deploy/adapters/cobbler/triggers/sync/post/migrate_ks.py b/deploy/adapters/cobbler/triggers/sync/post/migrate_ks.py
index ac30c532..9ef8a26c 100644
--- a/deploy/adapters/cobbler/triggers/sync/post/migrate_ks.py
+++ b/deploy/adapters/cobbler/triggers/sync/post/migrate_ks.py
@@ -1,29 +1,29 @@
-#!/usr/bin/python
-"""script to migrate rendered kickstart files from cobbler to outside."""
-import logging
-
-from cobbler import api
-
-
-def main():
- """main entry"""
- cobbler_api = api.BootAPI()
- for system in cobbler_api.systems():
- cobbler_api.kickgen.generate_kickstart_for_system(system.name)
- try:
- with open(
- '/var/www/cblr_ks/%s' % system.name, 'w'
- ) as kickstart_file:
- logging.info("Migrating kickstart for %s", system.name)
- data = cobbler_api.kickgen.generate_kickstart_for_system(
- system.name)
- kickstart_file.write(data)
- except Exception as error:
- logging.error("Directory /var/www/cblr_ks/ does not exist.")
- logging.exception(error)
- raise error
-
-
-if __name__ == '__main__':
- logging.info("Running kickstart migration")
- main()
+#!/usr/bin/python
+"""script to migrate rendered kickstart files from cobbler to outside."""
+import logging
+
+from cobbler import api
+
+
+def main():
+ """main entry"""
+ cobbler_api = api.BootAPI()
+ for system in cobbler_api.systems():
+ cobbler_api.kickgen.generate_kickstart_for_system(system.name)
+ try:
+ with open(
+ '/var/www/cblr_ks/%s' % system.name, 'w'
+ ) as kickstart_file:
+ logging.info("Migrating kickstart for %s", system.name)
+ data = cobbler_api.kickgen.generate_kickstart_for_system(
+ system.name)
+ kickstart_file.write(data)
+ except Exception as error:
+ logging.error("Directory /var/www/cblr_ks/ does not exist.")
+ logging.exception(error)
+ raise error
+
+
+if __name__ == '__main__':
+ logging.info("Running kickstart migration")
+ main()