Skip to content

Commit b0418fb

Browse files
committed
python3: fix printing of called box command
To make test box-py/call.test.py compatible with Python 2 and Python 3 it must have the same output when running with both versions of interpeter. With running on Python 2.7 output of called commands concluded to round brackets while on Python 3 it is not. [001] @@ -20,7 +20,7 @@ [001] - true [001] - null [001] ... [001] -call f1 () [001] +('call ', 'f1', ((),)) [001] - 'testing' [001] - 1 [001] - False To fix it print should use formatted string in print() call. Part of #20
1 parent 8e07484 commit b0418fb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/box_connection.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ def execute(self, command, silent=True):
8888
def call(self, command, *args):
8989
if not command:
9090
return
91-
print('call ', command, args)
91+
print('call {} {}'.format(command, args))
9292
response = self.py_con.call(command, *args)
9393
result = str(response)
9494
print(result)

0 commit comments

Comments
 (0)