def erase(self):
        """
            removed the database file from the disk
            
            this is called recursively for all sub PersistentDataStructure
        """
        if self.verbose > 1:
            print("erase db               {} in {}".format(self._name, self._dirname))        

        if self.is_closed():
            self.open()
            
        try:

            if self.verbose > 1:
                print("sub_data_keys:", self.sub_data_keys)
            for key in self:
                t, v = self.get_value_and_value_type(key)
                if t == TYPE_SUB:
                    with self.getData(key) as sub_data:
                        sub_data.erase()
                elif t == TYPE_NPA:
                    os.remove(os.path.join(self._dirname, v['fname']))

        except:
            traceback.print_exc()
        finally:
            self.close()

        if self.verbose > 1:
            print("remove", self._filename)
        os.remove(path = self._filename)
        try:
            os.rmdir(path = self._dirname)
        except OSError as e:
            if 0 > self.verbose:
                warnings.warn("directory structure can not be deleted\n{}".format(e))
dataset/ETHPy150Open cimatosa/jobmanager/jobmanager/persistentData.py/PersistentDataStructure.erase/swapped operands of `>`