Fixed deprecation warnings.
h3rald h3rald@h3rald.com
Sun, 30 Apr 2023 13:58:53 +0000
2 files changed,
5 insertions(+),
5 deletions(-)
M
hastysite.nim
→
hastysite.nim
@@ -142,7 +142,7 @@ if s.startsWith("----"):
delimiter.inc else: cfg &= s&"\n" - except: + except CatchableError: discard if not obj.hasKey("contents"): obj["contents"] = newJObject()@@ -166,7 +166,7 @@ warn e.msg
else: discard p.close() - except: + except CatchableError: meta = newJObject() meta["path"] = %fileid meta["id"] = %fileid.changeFileExt("")@@ -377,7 +377,7 @@ let ext = i.dget(d, "ext").getString
var contents = "" try: contents = i.dget(d, "contents").getString - except: + except CatchableError: raise MetadataRequiredException(msg: "Metadata key 'contents' not found in dictionary.") let outname = id&ext let outfile = hs.dirs.output/outname@@ -507,4 +507,4 @@ quit(0)
else: discard else: - discard + discard
M
hastysite.nimble
→
hastysite.nimble
@@ -9,7 +9,7 @@ bin = @["hastysite"]
installDirs = @["minpkg", "hastysitepkg"] # Deps -requires: "nim >= 1.4.4, zippy >= 0.5.6" +requires: "nim >= 1.6.12, zippy >= 0.5.6" before install: exec "nimble install -y nifty"