From 1e71aaa5f562e53c2142366413f2efa0e57f0b00 Mon Sep 17 00:00:00 2001 From: ekultek Date: Wed, 4 Oct 2017 07:07:43 -0500 Subject: [PATCH] gave write_to_file function ability to write list, tuple, set to files (issue #40) --- lib/settings.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/settings.py b/lib/settings.py index b3141c8..af15b57 100644 --- a/lib/settings.py +++ b/lib/settings.py @@ -22,7 +22,7 @@ except NameError: # clone link CLONE = "https://github.com/ekultek/zeus-scanner.git" # current version -VERSION = "1.0.27.de68" +VERSION = "1.0.28.8fb0" # colors to output depending on the version VERSION_TYPE_COLORS = {"dev": 33, "stable": 92, "other": 30} # version string formatting @@ -395,6 +395,10 @@ def write_to_log_file(data_to_write, path, filename): for item in data_to_write: item = item.strip() log.write(str(item) + "\n") + elif isinstance(data_to_write, (tuple, set)): + for item in list(data_to_write): + item = item.strip() + log.write(str(item) + "\n") else: log.write(data_to_write + "\n") logger.info(set_color(