parameters: (self, target_path, client_host_name, db_name)
docstring: Deletes target's publish directory.
  
      Args:
        target_path: target path.
        client_host_name: client host name.
        db_name: database name (assetroot path).
      Raises:
        PublishServeException.
docstring_summary: Deletes target's publish directory.
docstring_tokens: Deletes target s publish directory .
function: def DeleteTargetPublishDir(self, target_path, client_host_name, db_name):
      """Deletes target's publish directory.
  
      Args:
        target_path: target path.
        client_host_name: client host name.
        db_name: database name (assetroot path).
      Raises:
        PublishServeException.
      """
      (norm_db_path, db_type) = serve_utils.IdentifyPublishedDb(db_name)
      if serve_utils.IsFusionDb(db_type):
        if not client_host_name:
          raise exceptions.PublishServeException(
              "Internal error - undefined host name for Fusion database %s." %
              db_name)
  
        gedb_path = self.BuildDbPublishPath(client_host_name, norm_db_path)
        target_gedb_path = self.BuildTargetPublishPath(gedb_path, target_path)
  
        try:
          logger.debug("Delete DB publish directory: %s", target_gedb_path)
          # Remove all the files/dirs under the publish db path (included).
          shutil.rmtree(target_gedb_path)
        except OSError as e:
          logger.warning(
              "HandleUnpublishRequest: Could not delete DB publish directory: %s"
              ", Error: %s", target_gedb_path, e)
  
        try:
          # Remove '..gedb/targets'- directory if it is empty.
          os.rmdir(os.path.dirname(target_gedb_path))
        except OSError:
          pass
function_tokens: def DeleteTargetPublishDir ( self , target_path , client_host_name , db_name ) : ( norm_db_path , db_type ) = serve_utils . IdentifyPublishedDb ( db_name ) if serve_utils . IsFusionDb ( db_type ) : if not client_host_name : raise exceptions . PublishServeException ( "Internal error - undefined host name for Fusion database %s." % db_name ) gedb_path = self . BuildDbPublishPath ( client_host_name , norm_db_path ) target_gedb_path = self . BuildTargetPublishPath ( gedb_path , target_path ) try : logger . debug ( "Delete DB publish directory: %s" , target_gedb_path ) # Remove all the files/dirs under the publish db path (included). shutil . rmtree ( target_gedb_path ) except OSError as e : logger . warning ( "HandleUnpublishRequest: Could not delete DB publish directory: %s" ", Error: %s" , target_gedb_path , e ) try : # Remove '..gedb/targets'- directory if it is empty. os . rmdir ( os . path . dirname ( target_gedb_path ) ) except OSError : pass