code: def assert_compile_finished(app_folder):
      
      fpath = os.path.join(app_folder, '.postbuild.flag')
      if not os.path.isfile(fpath):
          msg = ('No postbuild flag set, LXC container may have crashed while '
                 'building. Check compile logs for build.')
          raise AssertionError(msg)
      try:
          os.remove(fpath)
      except OSError:
          # It doesn't matter if it fails.
          pass
docs: Once builder.sh has invoked the compile script, it should return and we
      should set a flag to the script returned. If that flag is missing, then
      it is an indication that the container crashed, and we generate an error.
  
      This function will clean up the flag after the check is performed, so only
      call this function once. See issue #141.