aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbnewbold <bnewbold@robocracy.org>2017-07-16 15:58:25 -0700
committerbnewbold <bnewbold@robocracy.org>2017-07-16 15:59:00 -0700
commitda67e50a81f5d6b95ea3aabe06d9e16bdfc3729a (patch)
tree352be68d99142f21fdc4af8fb70f1dd6cd1f3f94
parentc88a5eee8db078d2032d040b4d45fbb1e4e617d4 (diff)
downloaddivergence-da67e50a81f5d6b95ea3aabe06d9e16bdfc3729a.zip
divergence-da67e50a81f5d6b95ea3aabe06d9e16bdfc3729a.tar.gz
small bugfixes
-rwxr-xr-xdivergence4
1 files changed, 2 insertions, 2 deletions
diff --git a/divergence b/divergence
index e54805f..9351e45 100755
--- a/divergence
+++ b/divergence
@@ -82,10 +82,10 @@ class DivergenceProgram:
return None
assert respj['size'] == 1, "Expect single result for title lookup"
page = respj['results'][0]
+ assert page['space']['key'].upper() == space_key.upper(), "Expect spaces to match"
else:
# We did a fetch by page_id directly
page = respj
- assert page['space']['key'].upper() == space_key.upper(), "Expect spaces to match"
return {"id": int(page['id']),
"version": int(page['version']['number']),
@@ -174,6 +174,7 @@ class DivergenceProgram:
for f in files:
meta = self.metadata(f)
+ log.debug(meta)
title = meta.get('confluence-page-title',
self.title_from_path(f))
space_key = meta.get('confluence-space-key',
@@ -183,7 +184,6 @@ class DivergenceProgram:
body = self.convert(f)
prev = self.get_page(title, space_key=space_key, page_id=page_id)
log.debug(prev)
- log.debug(self.metadata(f))
if prev is None:
self.create_page(title, body, space_key=space_key)
print(f + ": created")