summaryrefslogtreecommitdiff
path: root/addons/hw_proxy/controllers/main.py
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2017-08-23 16:44:58 +0200
committerChristophe Simonis <chs@odoo.com>2017-08-23 16:44:58 +0200
commit30bd5ac0e904906d90f4767bbbf178bf940c0c66 (patch)
treeea271d0f46ed35c8af460aa71890c1dce474d2a4 /addons/hw_proxy/controllers/main.py
parent7f2bd086087f73878f62933ecd2e7c2bed32142e (diff)
parentaec6248bb379c1ece02f5d4f718566c770fc2c6f (diff)
[MERGE] forward port branch saas-16 up to aec6248bb37
Diffstat (limited to 'addons/hw_proxy/controllers/main.py')
-rw-r--r--addons/hw_proxy/controllers/main.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/addons/hw_proxy/controllers/main.py b/addons/hw_proxy/controllers/main.py
index 0521b72c89b..02f083110e7 100644
--- a/addons/hw_proxy/controllers/main.py
+++ b/addons/hw_proxy/controllers/main.py
@@ -5,6 +5,7 @@ from __future__ import print_function
import logging
import subprocess
import time
+import subprocess
from threading import Lock
@@ -23,7 +24,7 @@ BANNED_DEVICES = {
}
-# drivers modules must add to drivers an object with a get_status() method
+# drivers modules must add to drivers an object with a get_status() method
# so that 'status' can return the status of all active drivers
drivers = {}
@@ -108,7 +109,7 @@ class Proxy(http.Controller):
if not (device_id in BANNED_DEVICES):
resp += "<div class='device' data-device='"+device+"'>"+device_name+"</div>\n"
count += 1
-
+
if count == 0:
resp += "<div class='device'>No USB Device Found</div>"
@@ -126,7 +127,7 @@ class Proxy(http.Controller):
""" % subprocess.check_output('lsusb -v', shell=True)
return request.make_response(resp,{
- 'Cache-Control': 'no-cache',
+ 'Cache-Control': 'no-cache',
'Content-Type': 'text/html; charset=utf-8',
'Access-Control-Allow-Origin': '*',
'Access-Control-Allow-Methods': 'GET',
@@ -167,7 +168,7 @@ class Proxy(http.Controller):
@http.route('/hw_proxy/payment_request', type='json', auth='none', cors='*')
def payment_request(self, price):
"""
- The PoS will activate the method payment
+ The PoS will activate the method payment
"""
print("payment_request: price:%s" % price)
return 'ok'
@@ -175,7 +176,7 @@ class Proxy(http.Controller):
@http.route('/hw_proxy/payment_status', type='json', auth='none', cors='*')
def payment_status(self):
print("payment_status")
- return { 'status':'waiting' }
+ return { 'status':'waiting' }
@http.route('/hw_proxy/payment_cancel', type='json', auth='none', cors='*')
def payment_cancel(self):