make send_now check that the printer is online before talking to it

master
Logxen 2012-06-14 23:41:54 -07:00
parent b5dbecc8ac
commit 97cad4e003
1 changed files with 10 additions and 7 deletions

View File

@ -209,6 +209,7 @@ class printcore():
def send_now(self,command):
"""Sends a command to the printer ahead of the command queue, without a checksum
"""
if(self.online):
if(self.printing):
self.priqueue+=[command]
else:
@ -216,6 +217,8 @@ class printcore():
time.sleep(0.001)
self._send(command)
#callback for command sent
else
print "Not connected to printer."
def _print(self):
#callback for printing started