Skip to content

Commit

Permalink
Merge branch 'master' of github.com:Wikidata/soweego
Browse files Browse the repository at this point in the history
  • Loading branch information
Marco Fossati committed Jul 17, 2019
2 parents dce44e2 + 5be08ac commit fcf1a9e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions soweego/commons/logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,15 +85,15 @@ def emit(self, record):

class GzipLoggingHandler(logging.StreamHandler):
def __init__(self, filename: str):
stream = gzip.open(filename, 'w')
stream = gzip.open(filename, 'wt')
super().__init__(stream)

# we only overwrite `Logging.StreamHandler`
# emit method
def emit(self, record):
try:
msg = self.format(record)
self.stream.write(msg.encode('utf8') + '\n')
self.stream.write(msg + '\n')
self.flush()
except (KeyboardInterrupt, SystemExit):
raise
Expand Down
2 changes: 1 addition & 1 deletion soweego/ingester/mix_n_match_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ def _import_matches(
url_prefix,
):
for qid, tid, score in tqdm(links_reader, total=n_links):
url = '' if url_prefix is None else url_prefix + tid
url = '' if url_prefix is None else f'{url_prefix}{tid}'

db_entity = mix_n_match.MnMEntry()
_set_entry_fields(
Expand Down

0 comments on commit fcf1a9e

Please sign in to comment.