Fix lint errors.

License: MIT
Signed-off-by: David Grisham <dgrisham@mines.edu>
This commit is contained in:
dgrisham 2018-10-17 09:03:43 -06:00
parent b08648c720
commit 51af3c1e03
2 changed files with 2 additions and 1 deletions

View File

@ -4,7 +4,6 @@ Generate a palette using various backends.
import logging
import os
import random
import re
import sys
from . import theme

View File

@ -182,9 +182,11 @@ def get_pid(name):
def hashf(fpath):
"""Get the md5 hash of a file."""
return hashlib.md5(file_bytes(open(fpath, 'rb'))).hexdigest()
def file_bytes(fpath):
"""Helper function to read file."""
with fpath:
return fpath.read()