Skip to content

Commit

Permalink
final bugfixes
Browse files Browse the repository at this point in the history
  • Loading branch information
staffanm committed Aug 25, 2016
1 parent 85caa3c commit 7a7b972
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
5 changes: 3 additions & 2 deletions ferenda/devel.py
Expand Up @@ -717,8 +717,9 @@ def statusreport(self, alias=None):
# action, probably through a custom key func
for action in sorted(entry.status):
status = entry.status[action]
if "success" not in status:
from pudb import set_trace; set_trace()
if not status:
log.warning("%s/%s: file %s has no status data for action %s" % (repo.alias, basefile, entrypath, action))
continue
if "success" in status and status["success"] == "removed":
# this special truthy value indicates that
# everything went as OK as it could, but the
Expand Down
2 changes: 1 addition & 1 deletion ferenda/sources/legal/se/myndfskr.py
Expand Up @@ -154,7 +154,7 @@ def download_get_basefiles(self, source):
resolve_base_href=True)
source = tree.iterlinks()

def download_single(self, basefile, url):
def download_single(self, basefile, url=None):
if self.download_rewrite_url:
if callable(self.download_rewrite_url):
url = self.download_rewrite_url(basefile, url)
Expand Down
10 changes: 7 additions & 3 deletions lagen/nu/myndfskr.py
Expand Up @@ -119,10 +119,14 @@ def download(self, basefile=None, reporter=None):
basefiles = []
try:
ret = inst.download(basefile, reporter=basefiles.append)
except Exception as e:
loc = util.location_exception(e)
self.log.error("download for %s failed: %s (%s)" % (c.alias, e, loc))
ret = False
finally:
for basefile in basefiles:
util.link_or_copy(inst.store.documententry_path(basefile),
self.store.documententry_path(basefile))
for b in basefiles:
util.link_or_copy(inst.store.documententry_path(b),
self.store.documententry_path(b))
# msbfs/entries/.root.json -> myndfs/entries/msbfs.json
util.link_or_copy(inst.store.documententry_path(".root"),
self.store.documententry_path(inst.alias))
Expand Down

0 comments on commit 7a7b972

Please sign in to comment.