Tests are failing because a receive mode dir already exists, so this makes them pass

This commit is contained in:
Micah Lee 2019-01-21 17:43:13 -08:00
parent 2fcedb8730
commit f854b3ff37
No known key found for this signature in database
GPG Key ID: 403C2657CD994F73

View File

@ -137,7 +137,7 @@ class ReceiveModeWeb(object):
# Make sure receive mode dir exists before writing file # Make sure receive mode dir exists before writing file
valid = True valid = True
try: try:
os.makedirs(receive_mode_dir, 0o700) os.makedirs(receive_mode_dir, 0o700, exist_ok=True)
except PermissionError: except PermissionError:
self.web.add_request(self.web.REQUEST_ERROR_DATA_DIR_CANNOT_CREATE, request.path, { self.web.add_request(self.web.REQUEST_ERROR_DATA_DIR_CANNOT_CREATE, request.path, {
"receive_mode_dir": receive_mode_dir "receive_mode_dir": receive_mode_dir