(self, filename)
return dict()
Check if the host has changed
Check if the host has changed
Check if the host has changed
def _is_same_osenv(self, filename):
        """Check if the host has changed"""
        try:
            saved = json.loads(FileUtil(filename).getdata())
            if (saved["osversion"] == HostInfo().osversion() and
                    saved["oskernel"] == HostInfo().oskernel() and
                    saved["arch"] == HostInfo().arch() and
                    saved["osdistribution"] == \
                        str(HostInfo().osdistribution())):
                return saved
        except (IOError, OSError, AttributeError, ValueError, TypeError,
                IndexError, KeyError):
            pass
        return dict()
def _is_same_osenv ( self , filename ) : try : saved = json . loads ( FileUtil ( filename ) . getdata ( ) ) if ( saved [ "osversion" ] == HostInfo ( ) . osversion ( ) and saved [ "oskernel" ] == HostInfo ( ) . oskernel ( ) and saved [ "arch" ] == HostInfo ( ) . arch ( ) and saved [ "osdistribution" ] == str ( HostInfo ( ) . osdistribution ( ) ) ) : return saved except ( IOError , OSError , AttributeError , ValueError , TypeError , IndexError , KeyError ) : pass return dict ( )