• Kirill Smelkov's avatar
    FileStorage: Report problem on read-only open of non-existent file · 56c96a11
    Kirill Smelkov authored
    ... instead of silently creating empty database on such opens.
    
    Use-case for this are utilities like e.g. zodbdump and zodbcmp which
    expect such storage opens to fail so that the tool can know there is no
    such storage and report it to user.
    
    In contrast current state is: read-only opens get created-on-the-fly
    empty storage with no content, but which can be iterated over without
    getting any error.
    
    This way e.g. `zodbdump non-existent.fs` produces empty output _and_
    exit code 0 which is not what caller expects.
    
    (cherry picked from commit 30bbabf19e837b4ca9e35fab5d5c1278b078fe45)
    56c96a11
testConfig.py 5.28 KB