Skip to content

Commit ca906a6

Browse files
committed
fix some warnings
1 parent ff33bc1 commit ca906a6

File tree

4 files changed

+9
-13
lines changed

4 files changed

+9
-13
lines changed

components/controls/buttons_usb_encoder/buttons_usb_encoder.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@
3030
getattr(function_calls, function_name)(function_args)
3131
except:
3232
logger.warning(
33-
"Function " + function_name + " not found in function_calls.py (mapped from button: " + button_string + ")")
33+
"Function " + function_name + " not found in function_calls.py (mapped from button: "
34+
+ button_string + ")")
3435
except KeyError:
3536
logger.warning("Button " + button_string + " not mapped to any function.")
3637
except:

components/controls/buttons_usb_encoder/map_buttons_usb_encoder.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@
4343

4444
button_map[button_string] = function_name
4545
button_map[button_string + "_args"] = function_args
46-
print("Button '" + button_string + "' is now mapped to '" + function_name_short + "' with argument '" + str(function_args) + "'")
46+
print("Button '" + button_string + "' is now mapped to '" + function_name_short
47+
+ "' with argument '" + str(function_args) + "'")
4748
break
4849
except KeyboardInterrupt:
4950
continue

components/gpio_control/function_calls.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -100,10 +100,10 @@ def functionCallBluetoothToggle(self, mode=None):
100100
function_call("{command} -c=bluetoothtoggle -v={value}".format(command=self.playout_control, value=mode), shell=True)
101101

102102
def functionCallTriggerPlayCardId(self, cardid):
103-
function_call("{command} --cardid={value}".format(command=self.rfid_trigger, value = cardid), shell=True)
103+
function_call("{command} --cardid={value}".format(command=self.rfid_trigger, value=cardid), shell=True)
104104

105105
def functionCallTriggerPlayFolder(self, folder):
106-
function_call("{command} --dir={value}".format(command=self.rfid_trigger, value = folder), shell=True)
106+
function_call("{command} --dir={value}".format(command=self.rfid_trigger, value=folder), shell=True)
107107

108108
def getFunctionCall(self, functionName):
109109
self.logger.error('Get FunctionCall: {} {}'.format(functionName, functionName in locals()))

scripts/Reader.py.pcsc

+3-9
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,12 @@ class Reader:
2222
try:
2323
hresult, hcontext = SCardEstablishContext(SCARD_SCOPE_USER)
2424
if hresult != SCARD_S_SUCCESS:
25-
raise error(
26-
'Failed to establish context: ' + \
27-
SCardGetErrorMessage(hresult))
25+
raise error('Failed to establish context: ' + SCardGetErrorMessage(hresult))
2826

2927
try:
3028
hresult, readers = SCardListReaders(hcontext, [])
3129
if hresult != SCARD_S_SUCCESS:
32-
raise error(
33-
'Failed to list readers: ' + \
34-
SCardGetErrorMessage(hresult))
30+
raise error('Failed to list readers: ' + SCardGetErrorMessage(hresult))
3531

3632
readerstates = []
3733
for i in range(len(readers)):
@@ -57,9 +53,7 @@ class Reader:
5753
finally:
5854
hresult = SCardReleaseContext(hcontext)
5955
if hresult != SCARD_S_SUCCESS:
60-
raise error(
61-
'Failed to release context: ' + \
62-
SCardGetErrorMessage(hresult))
56+
raise error('Failed to release context: ' + SCardGetErrorMessage(hresult))
6357

6458
return (toHexString(response, PACK))
6559

0 commit comments

Comments
 (0)