Incorrect indent 51/39751/1
authorlhinds <lhinds@redhat.com>
Mon, 21 Aug 2017 12:41:59 +0000 (13:41 +0100)
committerlhinds <lhinds@redhat.com>
Mon, 21 Aug 2017 12:41:59 +0000 (13:41 +0100)
gate report function incorrectly indented

Change-Id: Id1b840847c7ae4d731cc3e80c93a1497ac963a88
Signed-off-by: lhinds <lhinds@redhat.com>
anteater/src/patch_scan.py
anteater/src/project_scan.py

index 0bc4e72..cd98523 100644 (file)
@@ -132,16 +132,16 @@ def scan_patch(project, patch_file, binary_list, file_audit_list,
                     logger.error('Matched Regular Exp: %s', regex)
                     logger.error('Rationale: %s', desc.rstrip())
                     failure = True
-                with open(reports_dir + "contents_" + project + ".log",
-                          "a") as gate_report:
-                    gate_report.write('File contains violation: {0}\n'.
-                                      format(patch_file))
-                    gate_report.write('Flagged Content: {0}'.
-                                      format(line))
-                    gate_report.write('Matched Regular Exp: {0}'.
-                                      format(regex))
-                    gate_report.write('Rationale: {0}'.
-                                      format(desc.rstrip()))
+                    with open(reports_dir + "contents_" + project + ".log",
+                              "a") as gate_report:
+                        gate_report.write('File contains violation: {0}\n'.
+                                          format(patch_file))
+                        gate_report.write('Flagged Content: {0}'.
+                                          format(line))
+                        gate_report.write('Matched Regular Exp: {0}'.
+                                          format(regex))
+                        gate_report.write('Rationale: {0}'.
+                                          format(desc.rstrip()))
         # Run license check
         licence_check(project, licence_ext, licence_ignore, patch_file)
 
index 3c37621..411e47f 100644 (file)
@@ -104,21 +104,21 @@ def scan_file(project_dir, project, binary_list, file_audit_list,
                             logger.error('Flagged Content: %s', line.rstrip())
                             logger.error('Matched Regular Exp: %s', regex)
                             logger.error('Rationale: %s', desc.rstrip())
-                        with open(reports_dir + "contents-" + project + ".log",
-                                  "a") \
-                                as gate_report:
-                                    gate_report. \
-                                        write('File contains violation: {0}\n'.
-                                              format(full_path))
-                                    gate_report. \
-                                        write('Flagged Content: {0}'.
-                                              format(line))
-                                    gate_report. \
-                                        write('Matched Regular Exp: {0}'.
-                                              format(regex))
-                                    gate_report. \
-                                        write('Rationale: {0}\n'.
-                                              format(desc.rstrip()))
+                            with open(reports_dir + "contents-" + project + ".log",
+                                      "a") \
+                                    as gate_report:
+                                        gate_report. \
+                                            write('File contains violation: {0}\n'.
+                                                  format(full_path))
+                                        gate_report. \
+                                            write('Flagged Content: {0}'.
+                                                  format(line))
+                                        gate_report. \
+                                            write('Matched Regular Exp: {0}'.
+                                                  format(regex))
+                                        gate_report. \
+                                            write('Rationale: {0}\n'.
+                                                  format(desc.rstrip()))
             else:
                 # Check if Binary is whitelisted
                 hashlist = get_lists.GetLists()