(self)
return status.returncode == 0
Check if the repository has been initialised
Check if the repository has been initialised
Check if the repository has been initialised
def repositoryInitialised(self):
        """Check if the repository has been initialised"""

        # Simple directory check first, except for ssh remote repositories
        if self.location.scheme != 'ssh' and not os.path.isdir(self.repositoryPath):
            return False

        # Check if it is a borg repository
        try:
            os.environ["BORG_PASSPHRASE"] = self.key
            args = [ 'borg', 'list', self.repositoryPath ]
            status = self.runCommand(args, "Checking if repository exists")
        except:
            return False

        return status.returncode == 0
def repositoryInitialised ( self ) : # Simple directory check first, except for ssh remote repositories if self . location . scheme != 'ssh' and not os . path . isdir ( self . repositoryPath ) : return False # Check if it is a borg repository try : os . environ [ "BORG_PASSPHRASE" ] = self . key args = [ 'borg' , 'list' , self . repositoryPath ] status = self . runCommand ( args , "Checking if repository exists" ) except : return False return status . returncode == 0