Эх сурвалжийг харах

HUE-3091 [oozie] Do not remove extra new lines from email action body

krish 10 жил өмнө
parent
commit
2b18df6

+ 2 - 2
apps/oozie/src/oozie/models2.py

@@ -192,7 +192,7 @@ class Workflow(Job):
     sub_wfs_ids = [node.data['properties']['workflow'] for node in nodes if node.data['type'] == 'subworkflow']
     sub_wfs_ids = [node.data['properties']['workflow'] for node in nodes if node.data['type'] == 'subworkflow']
     workflow_mapping = dict([(workflow.uuid, Workflow(document=workflow)) for workflow in Document2.objects.filter(uuid__in=sub_wfs_ids)])
     workflow_mapping = dict([(workflow.uuid, Workflow(document=workflow)) for workflow in Document2.objects.filter(uuid__in=sub_wfs_ids)])
 
 
-    xml = re.sub(re.compile('\s*\n+', re.MULTILINE), '\n', django_mako.render_to_string(tmpl, {
+    xml = re.sub(re.compile('>\s*\n+', re.MULTILINE), '>\n', django_mako.render_to_string(tmpl, {
               'wf': self,
               'wf': self,
               'workflow': data['workflow'],
               'workflow': data['workflow'],
               'nodes': nodes,
               'nodes': nodes,
@@ -200,7 +200,7 @@ class Workflow(Job):
               'node_mapping': node_mapping,
               'node_mapping': node_mapping,
               'workflow_mapping': workflow_mapping
               'workflow_mapping': workflow_mapping
           }))
           }))
-    return force_unicode(xml)
+    return force_unicode(xml.strip())
 
 
   @property
   @property
   def name(self):
   def name(self):

Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 1 - 0
apps/oozie/src/oozie/tests2.py


Энэ ялгаанд хэт олон файл өөрчлөгдсөн тул зарим файлыг харуулаагүй болно