Skip to content
This repository has been archived by the owner on Jun 29, 2022. It is now read-only.

Commit

Permalink
move import from __future__ to top of files.
Browse files Browse the repository at this point in the history
  • Loading branch information
chambridge committed Jun 16, 2017
1 parent 20e7c15 commit a618305
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion rho/cli.py
Expand Up @@ -13,9 +13,9 @@

""" Rho Command Line Interface """

from __future__ import print_function
import sys
import os
from __future__ import print_function
import rho.clicommands

import gettext
Expand Down
34 changes: 17 additions & 17 deletions rho/clicommands.py
Expand Up @@ -11,6 +11,7 @@

""" Rho CLI Commands """

from __future__ import print_function
import csv
import os
import sys
Expand All @@ -25,7 +26,6 @@
from optparse import OptionParser
from getpass import getpass
import gettext
from __future__ import print_function

t = gettext.translation('rho', 'locale', fallback=True)
_ = t.ugettext
Expand Down Expand Up @@ -503,8 +503,8 @@ def _do_command(self):
_create_main_inventory(success_hosts, best_map, profile)

elif not os.path.isfile('data/' + profile + '_hosts'):
print (_("Profile '%s' has not been processed. "
"Please use --reset with profile first.") % profile)
print("Profile '" + profile + "' has not been processed. " +
"Please use --reset with profile first.")
sys.exit(1)

cmd_string = 'ansible-playbook rho_playbook.yml -i data/'\
Expand Down Expand Up @@ -558,7 +558,7 @@ def _do_command(self):
if line_list[0] == self.options.name:
profile_exists = True
profile_str = ', '.join(line_list[0:2] + [line_list[3]])
print profile_str
print(profile_str)

if not profile_exists:
print(_("Profile '%s' does not exist.") % self.options.name)
Expand All @@ -583,7 +583,7 @@ def _do_command(self):
with open('data/profiles', 'r') as f:
lines = f.readlines()
for line in lines:
print line
print(line)


class ProfileEditCommand(CliCommand):
Expand Down Expand Up @@ -1054,14 +1054,14 @@ def _do_command(self):
if line_list[1] == self.options.name:
auth_exists = True
if line_list[4] and line_list[3]:
print ', '.join(line_list[0:3]) +\
', ********, ' + line_list[4]
print(', '.join(line_list[0:3]) +
', ********, ' + line_list[4])
elif not line_list[4]:
print ', '.join(line_list[0:3]) +\
', ********'
print(', '.join(line_list[0:3]) +
', ********')
else:
print ', '.join(line_list[0:3]) +\
', ' + line_list[4]
print(', '.join(line_list[0:3]) +
', ' + line_list[4])

if not auth_exists:
print('Auth "%s" does not exist' % self.options.name)
Expand Down Expand Up @@ -1091,14 +1091,14 @@ def _do_command(self):
for line in lines:
line_list = line.strip().split(',')
if line_list[3] and line_list[4]:
print ', '.join(line_list[0:3]) +\
', ********, ' + line_list[4]
print(', '.join(line_list[0:3]) +
', ********, ' + line_list[4])
elif not line_list[4]:
print ', '.join(line_list[0:3]) +\
', ********'
print(', '.join(line_list[0:3]) +
', ********')
else:
print ', '.join(line_list[0:3]) +\
', ' + line_list[4]
print(', '.join(line_list[0:3]) +
', ' + line_list[4])


class AuthAddCommand(CliCommand):
Expand Down

0 comments on commit a618305

Please sign in to comment.