| 
														
															@@ -106,7 +106,7 @@ class ExclusiveLock: 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         self.path = os.path.abspath(path) 
														 | 
														
														 | 
														
															         self.path = os.path.abspath(path) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         self.id = id or platform.get_process_id() 
														 | 
														
														 | 
														
															         self.id = id or platform.get_process_id() 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         self.unique_name = os.path.join(self.path, "%s.%d-%x" % self.id) 
														 | 
														
														 | 
														
															         self.unique_name = os.path.join(self.path, "%s.%d-%x" % self.id) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        self.ok_to_kill_stale_locks = kill_stale_locks 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        self.kill_stale_locks = kill_stale_locks 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         self.stale_warning_printed = False 
														 | 
														
														 | 
														
															         self.stale_warning_printed = False 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															     def __enter__(self): 
														 | 
														
														 | 
														
															     def __enter__(self): 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -163,16 +163,16 @@ class ExclusiveLock: 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                 thread = int(thread_str) 
														 | 
														
														 | 
														
															                 thread = int(thread_str) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             except ValueError: 
														 | 
														
														 | 
														
															             except ValueError: 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                 # Malformed lock name? Or just some new format we don't understand? 
														 | 
														
														 | 
														
															                 # Malformed lock name? Or just some new format we don't understand? 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-                # It's safer to just exit 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                # It's safer to just exit. 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                 return False 
														 | 
														
														 | 
														
															                 return False 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															             if platform.process_alive(host, pid, thread): 
														 | 
														
														 | 
														
															             if platform.process_alive(host, pid, thread): 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                 return False 
														 | 
														
														 | 
														
															                 return False 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															-            if not self.ok_to_kill_stale_locks: 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            if not self.kill_stale_locks: 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                 if not self.stale_warning_printed: 
														 | 
														
														 | 
														
															                 if not self.stale_warning_printed: 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                     # Log this at warning level to hint the user at the ability 
														 | 
														
														 | 
														
															                     # Log this at warning level to hint the user at the ability 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-                    logger.warning("Found stale lock %s, but not deleting because BORG_UNIQUE_HOSTNAME is not set.", name) 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                    logger.warning("Found stale lock %s, but not deleting because BORG_HOSTNAME_IS_UNIQUE is not set.", name) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                     self.stale_warning_printed = True 
														 | 
														
														 | 
														
															                     self.stale_warning_printed = True 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                 return False 
														 | 
														
														 | 
														
															                 return False 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -213,7 +213,7 @@ class LockRoster: 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     def __init__(self, path, id=None, kill_stale_locks=False): 
														 | 
														
														 | 
														
															     def __init__(self, path, id=None, kill_stale_locks=False): 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         self.path = path 
														 | 
														
														 | 
														
															         self.path = path 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         self.id = id or platform.get_process_id() 
														 | 
														
														 | 
														
															         self.id = id or platform.get_process_id() 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        self.ok_to_kill_zombie_locks = kill_stale_locks 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        self.kill_stale_locks = kill_stale_locks 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															     def load(self): 
														 | 
														
														 | 
														
															     def load(self): 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         try: 
														 | 
														
														 | 
														
															         try: 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -221,7 +221,7 @@ class LockRoster: 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                 data = json.load(f) 
														 | 
														
														 | 
														
															                 data = json.load(f) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															             # Just nuke the stale locks early on load 
														 | 
														
														 | 
														
															             # Just nuke the stale locks early on load 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-            if self.ok_to_kill_zombie_locks: 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            if self.kill_stale_locks: 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                 for key in (SHARED, EXCLUSIVE): 
														 | 
														
														 | 
														
															                 for key in (SHARED, EXCLUSIVE): 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                     try: 
														 | 
														
														 | 
														
															                     try: 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                         entries = data[key] 
														 | 
														
														 | 
														
															                         entries = data[key] 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -237,7 +237,6 @@ class LockRoster: 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         except (FileNotFoundError, ValueError): 
														 | 
														
														 | 
														
															         except (FileNotFoundError, ValueError): 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             # no or corrupt/empty roster file? 
														 | 
														
														 | 
														
															             # no or corrupt/empty roster file? 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             data = {} 
														 | 
														
														 | 
														
															             data = {} 
														 | 
													
												
											
												
													
														| 
														 | 
														
															- 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         return data 
														 | 
														
														 | 
														
															         return data 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															     def save(self, data): 
														 | 
														
														 | 
														
															     def save(self, data): 
														 |