# if there's only one file loaded, try to work around a chicken<egg
elif hasattr(universe, "files") and len(
universe.files
- ) == 1 and not universe.files[universe.files.keys()[0]].is_writeable():
- data_file = universe.files[universe.files.keys()[0]].data
+ ) == 1 and not universe.files[
+ list(universe.files.keys())[0]].is_writeable():
+ data_file = universe.files[list(universe.files.keys())[0]].data
# try for a fallback default directory
if not default_dir and data_file.has_option(