ctalkington / python-ipp

Asynchronous Python client for Internet Printing Protocol (IPP)
MIT License
36 stars 20 forks source link

BUG: IppFinishings incorrectly encoded as hexadecimal #591

Closed pkuppens closed 4 weeks ago

pkuppens commented 3 months ago

class IppFinishing(IntEnum): includes STAPLE_TOP_LEFT = 0x0020

While this should be decimal integer 20, not hexadecimal.

Found this in an error message when trying IppFinishing.STAPLE_TOP_LEFT, it was parsed as -1, as there is no decimal 32 finishing.

Source: IPP Finishings 2.0 (FIN) page 20:

‘staple-top-left’ (20): Bind the Set(s) with one or more staples in the top left corner. ‘staple-bottom-left’ (21): Bind the Set(s) with one or more staples in the bottom left corner. ‘staple-top-right’ (22): Bind the Set(s) with one or more staples in the top right corner. ‘staple-bottom-right’ (23): Bind the Set(s) with one or more staples in the bottom right corner ... etc