From f854b3ff372597664d4ef5dce0f6ba0d3574b35f Mon Sep 17 00:00:00 2001 From: Micah Lee Date: Mon, 21 Jan 2019 17:43:13 -0800 Subject: [PATCH] Tests are failing because a receive mode dir already exists, so this makes them pass --- onionshare/web/receive_mode.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/onionshare/web/receive_mode.py b/onionshare/web/receive_mode.py index 6124ecf1..f035271a 100644 --- a/onionshare/web/receive_mode.py +++ b/onionshare/web/receive_mode.py @@ -137,7 +137,7 @@ class ReceiveModeWeb(object): # Make sure receive mode dir exists before writing file valid = True try: - os.makedirs(receive_mode_dir, 0o700) + os.makedirs(receive_mode_dir, 0o700, exist_ok=True) except PermissionError: self.web.add_request(self.web.REQUEST_ERROR_DATA_DIR_CANNOT_CREATE, request.path, { "receive_mode_dir": receive_mode_dir