(self, filename, data)
return True
Save container json to a file in the image TAG directory
        that has been previously selected via cd_imagerepo()
        or if the file starts with "/" to that specific file.
Save container json to a file in the image TAG directory
        that has been previously selected via cd_imagerepo()
        or if the file starts with "/" to that specific file.
Save container json to a file in the image TAG directory that has been previously selected via cd_imagerepo () or if the file starts with / to that specific file .
def save_json(self, filename, data):
        """Save container json to a file in the image TAG directory
        that has been previously selected via cd_imagerepo()
        or if the file starts with "/" to that specific file.
        """
        if filename.startswith("/"):
            out_filename = filename
        else:
            if not (self.cur_repodir and self.cur_tagdir):
                return False
            if not os.path.exists(self.cur_repodir):
                return False
            if not os.path.exists(self.cur_tagdir):
                return False
            out_filename = self.cur_tagdir + "/" + filename
        outfile = None
        try:
            outfile = open(out_filename, 'w')
            json.dump(data, outfile)
        except (IOError, OSError, AttributeError, ValueError, TypeError):
            if outfile:
                outfile.close()
            return False
        outfile.close()
        return True
def save_json ( self , filename , data ) : if filename . startswith ( "/" ) : out_filename = filename else : if not ( self . cur_repodir and self . cur_tagdir ) : return False if not os . path . exists ( self . cur_repodir ) : return False if not os . path . exists ( self . cur_tagdir ) : return False out_filename = self . cur_tagdir + "/" + filename outfile = None try : outfile = open ( out_filename , 'w' ) json . dump ( data , outfile ) except ( IOError , OSError , AttributeError , ValueError , TypeError ) : if outfile : outfile . close ( ) return False outfile . close ( ) return True