Merge "Fix python 3.x related Hacking warnings"

This commit is contained in:
Jenkins
2013-11-12 04:38:33 +00:00
committed by Gerrit Code Review
5 changed files with 82 additions and 72 deletions
+4 -2
View File
@@ -17,6 +17,8 @@
Command-line interface to the OpenStack Images API.
"""
from __future__ import print_function
import argparse
import json
import logging
@@ -520,8 +522,8 @@ def main():
try:
OpenStackImagesShell().main(map(strutils.safe_decode, sys.argv[1:]))
except KeyboardInterrupt:
print >> sys.stderr, '... terminating glance client'
print('... terminating glance client', file=sys.stderr)
sys.exit(1)
except Exception as e:
print >> sys.stderr, utils.exception_to_str(e)
print(utils.exception_to_str(e), file=sys.stderr)
sys.exit(1)