Skip to content

Commit

Permalink
Stop using os.errno, which was removed in Python 3.7 (fixes YoRyan#29
Browse files Browse the repository at this point in the history
…and fixes YoRyan#30)
  • Loading branch information
YoRyan committed Jul 27, 2019
1 parent 7054567 commit 87ddae0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions nuxhash/settings.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import configparser
import errno
import json
import os
from collections import defaultdict
Expand Down Expand Up @@ -108,7 +109,7 @@ def load_settings(config_dir):
with open(config_dir/SETTINGS_FILENAME, 'r') as settings_fd:
settings = read_settings_from_file(settings_fd)
except IOError as err:
if err.errno != os.errno.ENOENT:
if err.errno != errno.ENOENT:
raise
return DEFAULT_SETTINGS
else:
Expand All @@ -120,7 +121,7 @@ def load_benchmarks(config_dir, devices):
with open(config_dir/BENCHMARKS_FILENAME, 'r') as benchmarks_fd:
benchmarks = read_benchmarks_from_file(benchmarks_fd, devices)
except IOError as err:
if err.errno != os.errno.ENOENT:
if err.errno != errno.ENOENT:
raise
return EMPTY_BENCHMARKS
else:
Expand Down

0 comments on commit 87ddae0

Please sign in to comment.