Skip to content

Commit

Permalink
Handle err=3 from pyosmium-up-to-date as an error
Browse files Browse the repository at this point in the history
With pyosmium 3.1.3, pyosmium-up-to-date sends err=0 instead of 3 when pbf
doesn't need any update.
  • Loading branch information
jocelynj committed Mar 2, 2021
1 parent 86d8872 commit 2e26e7e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions modules/OsmOsisManager.py
Original file line number Diff line number Diff line change
Expand Up @@ -424,10 +424,9 @@ def run_osmium_diff(self, conf):
cmd += ["--force-update-of-old-planet"]
cmd += [pbf_file]
# pyosmium-up-to-date returns:
# - 0 on full update
# - 0 on full update, or if pbf is already up-to-date
# - 1 on partial update
# - 3 when no update to be done - TODO: to be removed with pyosmium 3.1.3
ret = self.logger.execute_err(cmd, valid_return_code=(0, 1, 3))
ret = self.logger.execute_err(cmd, valid_return_code=(0, 1))

if ret == 0 or ret == 1:
shutil.move(tmp_pbf_file, pbf_file)
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ requests
transporthours
pyproj >= 2.1.0
Unidecode
osmium
osmium >= 3.1.3
git+https://invent.kde.org/libraries/kopeninghours.git@74bd4c5
libarchive

Expand Down

0 comments on commit 2e26e7e

Please sign in to comment.