Changeset a87154a in rtems-central for rtemsqual/content.py


Ignore:
Timestamp:
Apr 17, 2020, 5:15:26 AM (14 months ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
fd03a17
Parents:
eb54ec9
Message:

applconfig: Add unit tests

File:
1 edited

Legend:

Unmodified
Added
Removed
  • rtemsqual/content.py

    reb54ec9 ra87154a  
    209209    def write(self, path):
    210210        """ Writes the content to the file specified by the path. """
    211         os.makedirs(os.path.dirname(path), exist_ok=True)
     211        directory = os.path.dirname(path)
     212        if directory:
     213            os.makedirs(directory, exist_ok=True)
    212214        with open(path, "w+") as out:
    213215            out.write(self._content)
Note: See TracChangeset for help on using the changeset viewer.