Skip to content

Commit

Permalink
Convert 'port' in driverOps to integer for Network driver compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
alevilar committed Nov 23, 2024
1 parent 0079ad8 commit c293cbb
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/common/ComandosHandler.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,8 @@ def runTraductor(jsonTicket, queue):
raise DriverError(f"Driver {driverName} not usable")
elif driverName == "Network":
# classprinter.Network(host='', port=9100, timeout=60, *args, **kwargs)[source]
if 'port' in driverOps:
driverOps['port'] = int(driverOps['port'])
driver = printer.Network(**driverOps)
if not driver.is_usable():
raise DriverError(f"Driver {driverName} not usable")
Expand Down

0 comments on commit c293cbb

Please sign in to comment.