(self, filename, save=None)
return False
Save host info for is_same_host()
Save host info for is_same_host()
Save host info for is_same_host ()
def _save_osenv(self, filename, save=None):
        """Save host info for is_same_host()"""
        if save is None:
            save = dict()
        try:
            save["osversion"] = HostInfo().osversion()
            save["oskernel"] = HostInfo().oskernel()
            save["arch"] = HostInfo().arch()
            save["osdistribution"] = str(HostInfo().osdistribution())
            if FileUtil(filename).putdata(json.dumps(save)):
                return True
        except (AttributeError, ValueError, TypeError,
                IndexError, KeyError):
            pass
        return False
def _save_osenv ( self , filename , save = None ) : if save is None : save = dict ( ) try : save [ "osversion" ] = HostInfo ( ) . osversion ( ) save [ "oskernel" ] = HostInfo ( ) . oskernel ( ) save [ "arch" ] = HostInfo ( ) . arch ( ) save [ "osdistribution" ] = str ( HostInfo ( ) . osdistribution ( ) ) if FileUtil ( filename ) . putdata ( json . dumps ( save ) ) : return True except ( AttributeError , ValueError , TypeError , IndexError , KeyError ) : pass return False