Skip to content

Commit

Permalink
eliminate a function call
Browse files Browse the repository at this point in the history
(cherry picked from commit 1a5c7db)
  • Loading branch information
creatorcary authored and bugclerk committed Jan 14, 2025
1 parent b23fd58 commit 0426dd4
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/middlewared/middlewared/plugins/cloud_backup/init.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,15 @@ def ensure_initialized(self, cloud_backup):
text=True
)

if self.is_initialized(cloud_backup):
if self.is_initialized(restic_config):
return

self.init(cloud_backup)

@private
def is_initialized(self, cloud_backup):
def is_initialized(self, restic_config):
self.middleware.call_sync("network.general.will_perform_activity", "cloud_backup")

restic_config = get_restic_config(cloud_backup)

try:
subprocess.run(
restic_config.cmd + ["cat", "config"],
Expand Down

0 comments on commit 0426dd4

Please sign in to comment.