]> git.rmz.io Git - dotfiles.git/blobdiff - bin/monzo.py
bin/addnzb: show curl errors
[dotfiles.git] / bin / monzo.py
index 9f404ef0b50c33eccd7a9cf1a2e58a02e0f4b8e7..e54aae5bce487a124b76309cfcf1a471ca405d14 100755 (executable)
@@ -17,6 +17,9 @@ if __name__ == "__main__":
     with open(sys.argv[1], 'r') if len(sys.argv) > 1 else sys.stdin as fp:
         data = json.load(fp)
         for t in data.get("transactions"):
+            if t.get("decline_reason", ""):
+                continue
+
             try:
                 date = datetime.strptime(t["created"], "%Y-%m-%dT%H:%M:%S.%fZ")
             except ValueError: