Changeset

2054:b7c528027762

mod_storage_xmlarchive: Only try to close xmlfile if it has been opened (fixes traceback with limit=0)
author Kim Alvefur <zash@zash.se>
date Sun, 28 Feb 2016 16:23:30 +0100
parents 2053:40056a27f394
children 2055:2c6d84fb82d9
files mod_storage_xmlarchive/mod_storage_xmlarchive.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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