kolibri/core/content/management/commands/content.py
def ask_user_overwrite_or_keep_content(self, src, dst):
        """
        If destination has content inside, ask users if they want to overwrite
        content in the destination. We will copy the content to destination
        depending on the user response.
        """
        user_answer = input(
            self.style.WARNING(
                "The destination has content inside: {}\n"
                "Do you want to overwrite it completely? (y/N)".format(dst)
            )
        )

        # If the user does not want to keep the content in the destination,
        # remove the databases folder and storage folder in the destination
        # directory
        if user_answer.strip().lower() in ["y", "yes"]:
            shutil.rmtree(os.path.join(dst, "databases"))
            shutil.rmtree(os.path.join(dst, "storage"))

        elif user_answer.strip().lower() not in ["n", "no", ""]:
            self.stderr.write(
                self.style.ERROR(
                    "{} cannot be an answer to the question. "
                    "Please answer 'y' or 'n'.".format(user_answer)
                )
            )
            raise SystemExit(1)

        If destination has content inside, ask users if they want to overwrite
        content in the destination. We will copy the content to destination
        depending on the user response.
        
If destination has content inside, ask users if they want to overwrite
content in the destination. We will copy the content to destination
depending on the user response.
If destination has content inside ask users if they want to overwrite content in the destination . We will copy the content to destination depending on the user response .
def ask_user_overwrite_or_keep_content(self, src, dst):
        user_answer = input(
            self.style.WARNING(
                "The destination has content inside: {}\n"
                "Do you want to overwrite it completely? (y/N)".format(dst)
            )
        )
        if user_answer.strip().lower() in ["y", "yes"]:
            shutil.rmtree(os.path.join(dst, "databases"))
            shutil.rmtree(os.path.join(dst, "storage"))
        elif user_answer.strip().lower() not in ["n", "no", ""]:
            self.stderr.write(
                self.style.ERROR(
                    "{} cannot be an answer to the question. "
                    "Please answer 'y' or 'n'.".format(user_answer)
                )
            )
            raise SystemExit(1)
def ask_user_overwrite_or_keep_content ( self , src , dst ) : user_answer = input ( self . style . WARNING ( "The destination has content inside: {}\n" "Do you want to overwrite it completely? (y/N)" . format ( dst ) ) ) if user_answer . strip ( ) . lower ( ) in [ "y" , "yes" ] : shutil . rmtree ( os . path . join ( dst , "databases" ) ) shutil . rmtree ( os . path . join ( dst , "storage" ) ) elif user_answer . strip ( ) . lower ( ) not in [ "n" , "no" , "" ] : self . stderr . write ( self . style . ERROR ( "{} cannot be an answer to the question. " "Please answer 'y' or 'n'." . format ( user_answer ) ) ) raise SystemExit ( 1 )
If destination has content inside, ask users if they want to overwrite
content in the destination.
If destination has content inside ask users if they want to overwrite content in the destination .
"""
        If destination has content inside, ask users if they want to overwrite
        content in the destination. We will copy the content to destination
        depending on the user response.
        """ # If the user does not want to keep the content in the destination, # remove the databases folder and storage folder in the destination # directory
self
src
dst