diff --git a/secondary.py b/secondary.py
index 7bb3a381866fc4cb77affacabc6bf8efa21b5a04..4f73d0635ddd9427470b52fae5f447f973222a39 100644
--- a/secondary.py
+++ b/secondary.py
@@ -188,7 +188,7 @@ def do_backup(hash_name, options, socket_path, mount, path):
 
     # Connect to server config/hashtoc socket
     config_hash = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
-    atexit.register(cond_shutdown, config_hash, log)
+    atexit.register(cond_shutdown, config_hash)
     config_hash.connect(socket_path)
     # Send secondary config to primary
     config_hash.makefile('w').write(open(config_path).read())