Commit 93963902 authored by Francesco Poldi's avatar Francesco Poldi

Fix #379

parent 4116579d
......@@ -48,10 +48,12 @@ def createDirIfMissing(dirname):
def Csv(obj, config):
_obj_type = obj.__class__.__name__
if _obj_type == "str":
_obj_type = "username"
fieldnames, row = struct(obj, config.Custom[_obj_type], _obj_type)
base = addExt(config.Output, _obj_type, "csv")
if not (os.path.exists(base)):
with open(base, "w", newline='', encoding="utf-8") as csv_file:
writer = csv.DictWriter(csv_file, fieldnames=fieldnames)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment