mirror of
https://github.com/Ircama/epson_print_conf.git
synced 2025-05-21 02:35:20 -04:00
Fix waste counter conversion for some printers
This commit is contained in:
parent
54e9362422
commit
f14cd91b8e
2 changed files with 11 additions and 13 deletions
|
@ -170,20 +170,19 @@ def generate_config(config, traverse, add_fatal_errors, full, printer_model):
|
|||
for ncounter in counter:
|
||||
if ncounter.tag == "entry":
|
||||
if "oids" in waste:
|
||||
waste["oids"] += text_to_bytes(
|
||||
ncounter.text
|
||||
)
|
||||
waste["oids"] += text_to_bytes(ncounter.text)
|
||||
else:
|
||||
waste["oids"] = text_to_bytes(
|
||||
ncounter.text
|
||||
)
|
||||
waste["oids"] = text_to_bytes(ncounter.text)
|
||||
if ncounter.tag == "max":
|
||||
waste["divider"] = (
|
||||
int(ncounter.text) / 100
|
||||
)
|
||||
waste["divider"] = int(ncounter.text) / 100
|
||||
if full:
|
||||
for filter in ncounter:
|
||||
waste["filter"] = filter.text
|
||||
if counter.text:
|
||||
if "oids" in waste:
|
||||
waste["oids"] += text_to_bytes(counter.text)
|
||||
else:
|
||||
waste["oids"] = text_to_bytes(counter.text)
|
||||
chars[waste_string[count]] = waste
|
||||
count += 1
|
||||
if item.tag == "serial":
|
||||
|
@ -389,8 +388,7 @@ if __name__ == "__main__":
|
|||
'--address',
|
||||
dest='hostname',
|
||||
action="store",
|
||||
help='Default printer host name or IP address. (Example: -a 192.168.1.87)',
|
||||
required=True
|
||||
help='Default printer host name or IP address. (Example: -a 192.168.1.87)'
|
||||
)
|
||||
parser.add_argument(
|
||||
'-p',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue