summaryrefslogtreecommitdiff
path: root/pywal/util.py
diff options
context:
space:
mode:
authordgrisham <dgrisham@mines.edu>2018-10-17 09:03:43 -0600
committerdgrisham <dgrisham@mines.edu>2018-10-17 09:03:50 -0600
commit51af3c1e03875716d224e40878f821dac931fc9a (patch)
treebb8f7b6a45aa0a87cffc38142af982cc94e4aae8 /pywal/util.py
parentb08648c7201c9d3e7b10b412c43b494791e4b52e (diff)
Fix lint errors.
License: MIT Signed-off-by: David Grisham <dgrisham@mines.edu>
Diffstat (limited to 'pywal/util.py')
-rw-r--r--pywal/util.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/pywal/util.py b/pywal/util.py
index b58f5e4..10fb42c 100644
--- a/pywal/util.py
+++ b/pywal/util.py
@@ -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()