changeset 45:3acb7bc809b5 draft

More print statement fixes.
author trinity_ctat
date Thu, 25 Oct 2018 17:38:12 -0400
parents 76f2367996b8
children f4f48007db67
files data_manager/add_ctat_resource_lib.py
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/data_manager/add_ctat_resource_lib.py	Thu Oct 25 17:30:36 2018 -0400
+++ b/data_manager/add_ctat_resource_lib.py	Thu Oct 25 17:38:12 2018 -0400
@@ -11,6 +11,7 @@
 # if they don't want to add them by hand.
 
 import sys
+# The many calls to sys.stdout.flush() are done in order to get the output to be synchronized.
 import argparse
 import os
 import shutil
@@ -735,6 +736,7 @@
             sys.stdout.flush()
             raise
         finally:
+            sys.stdout.flush()
             # Some code to help us if errors occur.
             print "\n*******************************\nAfter running gmap_build."
             sys.stdout.flush()
@@ -858,7 +860,9 @@
         # We might still need to do a gmap_build.
         if gmap_build:
             print "Checking if we need to gmap the library."
+            sys.stdout.flush()
             gmap_the_library(cannonical_destination, force_gmap_build)
+            sys.stdout.flush()
             # gmap_the_library creates a gmap success file if it succeeds.
     else:
         print "build_the_library(): This code should never be printed. Something is wrong."
@@ -1455,6 +1459,7 @@
         # If we did not build the genome resource library
         # the user might still be asking for a gmap_build.
         gmap_the_library(genome_build_directory, args.force_gmap_build)
+        sys.stdout.flush()
 
     if (args.download_mutation_resources_url != ""):
         download_and_integrate_mutation_resources(source_url=args.download_mutation_resources_url, \