Bug fix for content library import+export management commands

Description

  1.  

    1.  

      1. Description
        This PR fixes buggy Studio management commands:

  • `export_content_library`

  • `import_content_library`

  1.  

    1.  

      1. Background
        1. ` export_content_library` command has a file encoding issue. It has been fixed by opening file in binary mode.
        2. `import_content_library` command has a string path encoding issue. It has been fixed by using `.encode()` and `decode()` in the right places.

*Studio Updates:* The commands above are working normally

*LMS Updates:* None

  1.  

    1.  

      1. Testing:
        Run commands on an existing library with id `<library_id>`. Save it in `/tmp` and import it using `staff` user as owner:
        ```
        ./manage.py cms export_content_library <library_id> /tmp
        ./manage.py cms export_content_library /tmp/<library_id>.tar.gz staff
        ```

Assignee

Unassigned

Reporter

Open Source Pull Request Bot

Labels

Contributor Name

Fennec Technologies

Repo

edx/edx-platform

Customer

None

Epic Link

None

OSCM Assignee

None

Platform Map Area (Levels 1 &amp; 2)

None

Platform Map Area (Levels 3 &amp; 4)

None

Blended Hour Utilization Percentage

None

edX Theme

None

edX Squad

None

Github Lines Added

3

Github Lines Deleted

3

Priority

Unset