From 8bb53d8a553fc5021c63ae878b4e54fea8e26184 Mon Sep 17 00:00:00 2001 From: Mike Date: Sun, 4 Aug 2019 18:59:32 -0700 Subject: [PATCH] Add __str__() method to just print settings and ahstuffff --- mikes-backup | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/mikes-backup b/mikes-backup index 7b7b1da..02355df 100755 --- a/mikes-backup +++ b/mikes-backup @@ -34,6 +34,26 @@ class MikesBackup: self.parse_args() + # + def __str__(self): + + s = "" + + s += "MikesBackup Class Instance" + s += "\nLog Dir: " + str(self.__log_dir) + s += "\nRemote Host: " + str(self.__remote_host) + s += "\nRemote User: " + str(self.__remote_user) + s += "\nDestination Dir Base: " + str(self.__destination_dir_base) + s += "\nSource Dirs: " + str(self.__source_dirs) + s += "\nSource Dir Excludes: " + str(self.__source_dir_excludes) + s += "\nSource Mountpoint Demands: " + str(self.__source_mountpoint_demands) + s += "\nSSH Key: " + str(self.__ssh_key) + s += "\nQuiet SSH: " + str(self.__quiet_ssh) + s += "\nForce Full Backup: " + str(self.__force_full) + s += "\nForce Differential: " + str(self.__force_differential) + + return s + # def log(self, s, o=None):