Skip to content

Commit

Permalink
Fixed cups.require()
Browse files Browse the repository at this point in the history
  • Loading branch information
zdohnal committed Apr 23, 2020
1 parent 573d614 commit c40536d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ NEWS

New in 2.0.1:
* pypi required .tar.gz
* cups.require couldn't handle version bigger than 1

New in 2.0.0:
* dropped macros for older CUPS < 2.0.0
Expand Down
3 changes: 3 additions & 0 deletions cupsmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -582,10 +582,13 @@ cups_require (PyObject *self, PyObject *args)

if (nver < nreq)
goto fail;
if (nver > nreq)
goto good;

nreq = strtoul (preq, &end, 0);
}

good:
Py_RETURN_NONE;
fail:
PyErr_SetString (PyExc_RuntimeError, "I am version " VERSION);
Expand Down

0 comments on commit c40536d

Please sign in to comment.