update print statement to work for python 2 and 3

Use the __future__ module to ensure print is a function and then use
it that way.

Change-Id: Iccd0018434e044354e90b16ca67bdbeb312b6151
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
This commit is contained in:
Doug Hellmann 2018-06-06 19:02:02 -04:00
parent b41978a287
commit f9766e1187
1 changed files with 4 additions and 1 deletions

View File

@ -11,6 +11,9 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from __future__ import print_function
from freezer_dr.common import config
from oslo_config import cfg
from oslo_log import log
@ -48,4 +51,4 @@ def main():
failed_nodes = evac.get_nodes_details(failed_nodes)
notifier.notify(failed_nodes, 'error')
else:
print "No nodes reported to be down"
print("No nodes reported to be down")