Enable H23* rules in pep/flake (py3-compat)
Basic python 3 compatibility fixies Change-Id: I97726d42706c538d40cb1662112e56c13432e87f Related-Bug: #1333290
This commit is contained in:
@@ -18,6 +18,8 @@
|
||||
Command-line interface to the OpenStack Manila API.
|
||||
"""
|
||||
|
||||
from __future__ import print_function
|
||||
|
||||
import argparse
|
||||
import glob
|
||||
import imp
|
||||
@@ -427,7 +429,7 @@ class OpenStackManilaShell(object):
|
||||
|
||||
commands.remove('bash-completion')
|
||||
commands.remove('bash_completion')
|
||||
print ' '.join(commands | options)
|
||||
print(' '.join(commands | options))
|
||||
|
||||
@utils.arg('command', metavar='<subcommand>', nargs='?',
|
||||
help='Display help for <subcommand>')
|
||||
@@ -455,14 +457,14 @@ def main():
|
||||
try:
|
||||
OpenStackManilaShell().main(map(strutils.safe_decode, sys.argv[1:]))
|
||||
except KeyboardInterrupt:
|
||||
print >> sys.stderr, "... terminating manila client"
|
||||
print("... terminating manila client", file=sys.stderr)
|
||||
sys.exit(130)
|
||||
except Exception, e:
|
||||
except Exception as e:
|
||||
logger.debug(e, exc_info=1)
|
||||
message = e.message
|
||||
if not isinstance(message, basestring):
|
||||
message = str(message)
|
||||
print >> sys.stderr, "ERROR: %s" % strutils.safe_encode(message)
|
||||
print("ERROR: %s" % strutils.safe_encode(message), file=sys.stderr)
|
||||
sys.exit(1)
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user