Function comment fixed.

This commit is contained in:
csoft2k 2017-07-27 21:06:48 +02:00
parent cbbcdd03db
commit b7241f9cc1

View File

@ -756,8 +756,7 @@ class Escpos(object):
def query_status(self, mode): def query_status(self, mode):
""" Queries the printer for its status, and returns an array of integers containing it. """ Queries the printer for its status, and returns an array of integers containing it.
:param mode: Querying command to be sent to the printer. :param mode: Integer that sets the status mode queried to the printer.
Available commands:
RT_STATUS_ONLINE: Printer status. RT_STATUS_ONLINE: Printer status.
RT_STATUS_PAPER: Paper sensor. RT_STATUS_PAPER: Paper sensor.
:rtype: array(integer)""" :rtype: array(integer)"""
@ -770,7 +769,7 @@ class Escpos(object):
""" Queries the printer its online status. """ Queries the printer its online status.
When online, returns True; False otherwise. When online, returns True; False otherwise.
:rtype: bool: True if online, False if offline.""" :rtype: bool: True if online, False if offline."""
status = self.query_status(RT_STATUS_ONLINE) status = self.query_status(RT_STATUS_ONLINE);
if len(status) == 0: if len(status) == 0:
return False; return False;
return not (status & RT_MASK_ONLINE) return not (status & RT_MASK_ONLINE)