Added env var for IPADDR
This commit is contained in:
parent
14b8a96774
commit
c458892376
6
print.py
6
print.py
@ -2,6 +2,7 @@
|
||||
|
||||
import socket
|
||||
import json
|
||||
import os
|
||||
from flask import Flask, render_template
|
||||
|
||||
CheckPrinterOnline = '7e4d3630312053310d0a'
|
||||
@ -9,7 +10,10 @@ MachingInfo = "7e4d3131350d0a"
|
||||
GetPrintPercent = "7e4d32370d0a"
|
||||
GetPrinterTemp = "7e4d3130350d0a"
|
||||
|
||||
HOST = '10.1.1.83' # The server's hostname or IP address
|
||||
if os.environ.get('IPADDR') == None:
|
||||
print("IPADDR environment variable not set please set to printer IP")
|
||||
SystemExit()
|
||||
HOST = os.environ.get('IPADDR') # The server's hostname or IP address
|
||||
PORT = 8899 # The port used by the server
|
||||
|
||||
application = Flask(__name__)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user