Skip to content

Commit

Permalink
idaholab#294, fix a minor bug when preload gz is not specified
Browse files Browse the repository at this point in the history
  • Loading branch information
mmguero committed Nov 16, 2023
1 parent 9d8861c commit cba9dc9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion netbox/scripts/netbox_init.py
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ def main():
if not x.endswith('.media.tar.gz')
]
preloadFiles.sort(key=lambda x: os.path.getmtime(x))
preloadDatabaseFile = next(iter(preloadFiles), None)
preloadDatabaseFile = next(iter(preloadFiles), '')

if os.path.isfile(preloadDatabaseFile):
# we're loading an existing database directly with postgreSQL
Expand Down

0 comments on commit cba9dc9

Please sign in to comment.