Skip to content

Replace os.system call in tarfile creation with subprocess function #547

@shreyb

Description

@shreyb

As mentioned in #546, we should start making the code more robust by replacing os.system calls like the one in tarfiles.tar_up() with either call or run from the subprocess module.

So for this particular case:

  • Make the appropriate os.system -> subprocess.run/call substitution in tarfiles.tar_up()
  • There are a few notes in tarfiles.py as to what needs to change with the error handling after the previous item is done. Make those changes.
  • Add to unit tests to make sure this method is still acting correctly
  • Change integration tests in test_full_home.py to observe new error handling

Metadata

Metadata

Assignees

No one assigned

    Labels

    cleanupGeneral code cleanup and optimizationenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions