# HG changeset patch # User Kim Alvefur # Date 1456673010 -3600 # Node ID b7c5280277623099f82e8699f0e7fd3e76ddf210 # Parent 40056a27f394b920365f916b4ff774523d597099 mod_storage_xmlarchive: Only try to close xmlfile if it has been opened (fixes traceback with limit=0) diff -r 40056a27f394 -r b7c528027762 mod_storage_xmlarchive/mod_storage_xmlarchive.lua --- a/mod_storage_xmlarchive/mod_storage_xmlarchive.lua Wed Feb 24 15:59:18 2016 +0100 +++ b/mod_storage_xmlarchive/mod_storage_xmlarchive.lua Sun Feb 28 16:23:30 2016 +0100 @@ -99,7 +99,7 @@ local first_item, last_item; return function () - if limit and count >= limit then xmlfile:close() return; end + if limit and count >= limit then if xmlfile then xmlfile:close() end return; end local filename; for d = start_day, last_day, step do