Skip to content

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