mirror of
https://github.com/TECHNOFAB11/bumpver.git
synced 2025-12-12 22:40:09 +01:00
Fix: py27 compat
This commit is contained in:
parent
9b950ebb83
commit
83a800bdeb
2 changed files with 3 additions and 3 deletions
|
|
@ -122,7 +122,7 @@ def _iter_file_paths(
|
|||
file_paths = glob.glob(globstr)
|
||||
if not any(file_paths):
|
||||
errmsg = f"No files found for path/glob '{globstr}'"
|
||||
raise FileNotFoundError(errmsg)
|
||||
raise IOError(errmsg)
|
||||
for file_path_str in file_paths:
|
||||
file_path = pl.Path(file_path_str)
|
||||
yield (file_path, pattern_strs)
|
||||
|
|
|
|||
|
|
@ -80,8 +80,8 @@ def test_error_bad_path():
|
|||
(project.dir / "setup.py").unlink()
|
||||
try:
|
||||
list(rewrite._iter_file_paths(cfg.file_patterns))
|
||||
assert False, "expected FileNotFoundError"
|
||||
except FileNotFoundError as ex:
|
||||
assert False, "expected IOError"
|
||||
except IOError as ex:
|
||||
assert "setup.py" in str(ex)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue