Skip to content

Commit

Permalink
Merge pull request #426 from h00die/quiet
Browse files Browse the repository at this point in the history
New Feature: Quiet Flag
  • Loading branch information
DaveYesland authored May 24, 2024
2 parents 017df0b + 3a2b65d commit b47a177
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions pacu/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -1770,14 +1770,15 @@ def run_cli(self, *args) -> None:
if arg.whoami is True:
self.print_key_info()

def run_gui(self) -> None:
def run_gui(self, quiet=False) -> None:
idle_ready = False

while True:
try:
if not idle_ready:
try:
print(f"""
if not quiet:
print("""
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣤⣶⣿⣿⣿⣿⣿⣿⣶⣄⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣾⣿⡿⠛⠉⠁⠀⠀⠈⠙⠻⣿⣿⣦⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
Expand All @@ -1802,8 +1803,8 @@ def run_gui(self) -> None:
⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⣿⡏⠉⠉⠉⠉⠀⠀⠀⢸⣿⣿⡏⠉⠉⢹⣿⣿⡇⠀⢸⣿⣿⣇⣀⣀⣸⣿⣿⣿⠀⢸⣿⣿⣿⣀⣀⣀⣿⣿⣿
⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⣿⡇⠀⠀⠀⠀⠀⠀⠀⢸⣿⣿⡇⠀⠀⢸⣿⣿⡇⠀⠸⣿⣿⣿⣿⣿⣿⣿⣿⡿⠀⠀⢿⣿⣿⣿⣿⣿⣿⣿⡟
⠀⠀⠀⠀⠀⠀⠀⠀⠘⠛⠛⠃⠀⠀⠀⠀⠀⠀⠀⠘⠛⠛⠃⠀⠀⠘⠛⠛⠃⠀⠀⠉⠛⠛⠛⠛⠛⠛⠋⠀⠀⠀⠀⠙⠛⠛⠛⠛⠛⠉⠀
Version: {self.get_pacu_version()}
""")
print(f"Version: {self.get_pacu_version()}")
except UnicodeEncodeError:
pass

Expand Down Expand Up @@ -1898,6 +1899,7 @@ def run(self) -> None:
parser.add_argument('--set-regions', nargs='+', default=None, help='<region1 region2 ...> or <all> for all', metavar='')
parser.add_argument('--whoami', action='store_true', help='Display information on current IAM user')
parser.add_argument('--version', action='version', version=f'Pacu {self.get_pacu_version()}', help='Display Pacu version')
parser.add_argument('-q', '--quiet', action='store_true', help='Do not print the banner on startup')
args = parser.parse_args()

if any([args.session, args.data, args.module_args, args.exec, args.set_regions, args.whoami, args.new_session, args.set_keys, args.activate_session]):
Expand All @@ -1908,7 +1910,7 @@ def run(self) -> None:
elif any([args.list_modules, args.pacu_help, args.module_info]):
self.run_cli(args)
else:
self.run_gui()
self.run_gui(args.quiet)

def assume_role(self, role_arn: str):
sts = self.get_boto3_client('sts')
Expand Down

0 comments on commit b47a177

Please sign in to comment.