From a2616972f1318ac107970610f8f9431b8ae81d03 Mon Sep 17 00:00:00 2001 From: Michael Murtaugh Date: Mon, 1 Jun 2020 07:05:27 +0200 Subject: [PATCH] use nopublish option in all cases --- etherdump/commands/pull.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/etherdump/commands/pull.py b/etherdump/commands/pull.py index 0659cbf..0655f28 100644 --- a/etherdump/commands/pull.py +++ b/etherdump/commands/pull.py @@ -165,23 +165,23 @@ def main (args): except OSError: pass + text = getjson(info['localapiurl']+'getText?'+urlencode(data)) + ########################################## + ## ENFORCE __NOPUBLISH__ MAGIC WORD + ########################################## + if args.nopublish and args.nopublish in text: + # NEED TO PURGE ANY EXISTING DOCS + print ("NOPUBLISH", file=sys.stderr) + try_deleting((p+raw_ext,p+".raw.html",p+".diff.html",p+".meta.json")) + continue + if args.all or args.text: - text = getjson(info['localapiurl']+'getText?'+urlencode(data)) ver = {"type": "text"} versions.append(ver) ver["code"] = text["_code"] if text["_code"] == 200: text = text['data']['text'] - ########################################## - ## ENFORCE __NOPUBLISH__ MAGIC WORD - ########################################## - if args.nopublish and args.nopublish in text: - # NEED TO PURGE ANY EXISTING DOCS - print ("NOPUBLISH", file=sys.stderr) - try_deleting((p+raw_ext,p+".raw.html",p+".diff.html",p+".meta.json")) - continue - ver["path"] = p+raw_ext ver["url"] = quote(ver["path"]) with open(ver["path"], "w") as f: