Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added ShardArchiver.py utility: #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

miguelportilla
Copy link

ShardArchiver is a command line utility that creates lz4
compressed tar archives from complete shards and optionally
transfers them to a remote server.

ShardArchiver is a command line utility that creates lz4
compressed tar archives from complete shards and optionally
transfers them to a remote server.
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

# Creates lz4 compressed tar archives from complete
# shards and optinally SCP transfers to a destination
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would make a good module level doc string (i.e. just make it a string: '''Create lz4 compressed archives...

# shards and optinally SCP transfers to a destination

import lz4.frame
import os
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This import is unused



def create_lz4(source_file, output_path):
src = open(source_file, mode='rb')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd use a with statement here for src

f.write(piece)


def process(args):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd give the arguments individual names rather than just passing in args. If the argument is optional (as with indenty_file, username, host, and host_directory), just default them to None.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants