Browse Source

handle single-categories better

boyska 2 years ago
parent
commit
ce36c364eb
1 changed files with 3 additions and 1 deletions
  1. 3 1
      ics2mdwn.py

+ 3 - 1
ics2mdwn.py

@@ -124,7 +124,9 @@ class HugoConverter(Converter):
                     vobject = talk.get("CATEGORIES")
                     if hasattr(vobject, 'cats'):
                         vobject = vobject.cat
-                    frontmatter["tags"] = [str(t) for t in vobject]
+                        frontmatter["tags"] = [str(t) for t in vobject]
+                    else:
+                        frontmatter["tags"] = [str(vobject)]
                 except Exception as exc:
                     logging.warning("Error parsing categories: %s", str(exc))
             if 'base' in frontmatter['tags']: