Skip to content
This repository has been archived by the owner on May 5, 2021. It is now read-only.

Finally submitting all the work I've done (plus some 2.7 stuff) #93

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

Conversation

cardinalorange
Copy link
Contributor

No description provided.

if "part" in filename:
filepath = os.path.join(fromdir, filename)
fileobj = open(filepath, 'rb')
while 1:
Copy link
Contributor

Choose a reason for hiding this comment

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

while True is probably the convention you should use.

if not "MD5" in filename:
if "part" in filename:
filepath = os.path.join(fromdir, filename)
fileobj = open(filepath, 'rb')
Copy link
Contributor

@mdgregor mdgregor Mar 20, 2017

Choose a reason for hiding this comment

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

try to use a context manager here so you don't have to worry about closing your file object:
with open(filepath, 'rb') as fileobj

https://docs.python.org/2/reference/compound_stmts.html#the-with-statement

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

Successfully merging this pull request may close these issues.

2 participants