Avoid print keyword for python2, in command rprint method

This commit is contained in:
Lance Edgar 2023-01-03 18:22:38 -06:00
parent ca03485cf8
commit 645259da20

View file

@ -2,7 +2,7 @@
################################################################################
#
# Rattail -- Retail Software Framework
# Copyright © 2010-2022 Lance Edgar
# Copyright © 2010-2023 Lance Edgar
#
# This file is part of Rattail.
#
@ -465,8 +465,10 @@ class Subcommand(object):
def rprint(self, *args, **kwargs):
self.require_rich()
from rich import print as rprint
# TODO: this could look different once python2 is out of the
# picture; but must avoid `print` keyword for python2
import rich
rprint = getattr(rich, 'print')
return rprint(*args, **kwargs)
def basic_prompt(self, info, default=None, is_password=False, is_bool=False,