Skip to content

Commit

Permalink
Fix style
Browse files Browse the repository at this point in the history
  • Loading branch information
SergeoLacruz committed Apr 6, 2024
1 parent 9d662f7 commit 080f8ab
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions inventree_zebra/zebra_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,21 +108,20 @@ def print_label(self, **kwargs):
li.write_graphic(label_image, width)
li.endorigin()


# Uncomment this if you need the intermediate zpl file for debugging.
# datafile=open('/home/user/label.txt','w')
# datafile.write(li.dumpZPL())
# datafile.close()

# Select the right printer.
# This is a multi printer hack. In case the label has an IP address in the metadata
# the address in the settings is overwritten be the metadata. By this you can
# specify a separate printer for each label.
# Select the right printer.
# This is a multi printer hack. In case the label has an IP address in the metadata
# the address in the settings is overwritten be the metadata. By this you can
# specify a separate printer for each label.

label=kwargs['label_instance']
label = kwargs['label_instance']
try:
ip_address = label.metadata['ip_address']
except:
except Exception:
ip_address = self.get_setting('IP_ADDRESS')

# Send the label to the printer
Expand Down

0 comments on commit 080f8ab

Please sign in to comment.