From aa53fe653c264dbc9a2090cbb11450529cf25ff7 Mon Sep 17 00:00:00 2001
From: Nick Sweeting <git@sweeting.me>
Date: Tue, 1 Jun 2021 02:58:36 -0400
Subject: [PATCH] fix use of uneeded perms arg

---
 archivebox/system.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/archivebox/system.py b/archivebox/system.py
index 347698f8..37927ba2 100644
--- a/archivebox/system.py
+++ b/archivebox/system.py
@@ -78,7 +78,7 @@ def run(cmd, *args, input=None, capture_output=True, timeout=None, check=False,
 
 
 @enforce_types
-def atomic_write(path: Union[Path, str], contents: Union[dict, str, bytes], overwrite: bool=True, permissions: str=OUTPUT_PERMISSIONS) -> None:
+def atomic_write(path: Union[Path, str], contents: Union[dict, str, bytes], overwrite: bool=True) -> None:
     """Safe atomic write to filesystem by writing to temp file + atomic rename"""
 
     mode = 'wb+' if isinstance(contents, bytes) else 'w'
@@ -105,8 +105,8 @@ def atomic_write(path: Union[Path, str], contents: Union[dict, str, bytes], over
             elif isinstance(contents, (bytes, str)):
                 f.write(contents)
 
-    # set permissions
-    os.chmod(path, int(permissions, base=8))
+    # set file permissions
+    os.chmod(path, int(OUTPUT_PERMISSIONS, base=8))
 
 @enforce_types
 def chmod_file(path: str, cwd: str='.') -> None:
@@ -118,7 +118,7 @@ def chmod_file(path: str, cwd: str='.') -> None:
 
     if not root.is_dir():
         # path is just a plain file
-        os.chmod(root, int(permissions, base=8))
+        os.chmod(root, int(OUTPUT_PERMISSIONS, base=8))
     else:
         for subpath in Path(path).glob('**/*'):
             if subpath.is_dir():