Avoid print
keyword for python2, in command rprint
method
This commit is contained in:
parent
ca03485cf8
commit
645259da20
|
@ -2,7 +2,7 @@
|
||||||
################################################################################
|
################################################################################
|
||||||
#
|
#
|
||||||
# Rattail -- Retail Software Framework
|
# Rattail -- Retail Software Framework
|
||||||
# Copyright © 2010-2022 Lance Edgar
|
# Copyright © 2010-2023 Lance Edgar
|
||||||
#
|
#
|
||||||
# This file is part of Rattail.
|
# This file is part of Rattail.
|
||||||
#
|
#
|
||||||
|
@ -465,8 +465,10 @@ class Subcommand(object):
|
||||||
def rprint(self, *args, **kwargs):
|
def rprint(self, *args, **kwargs):
|
||||||
self.require_rich()
|
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)
|
return rprint(*args, **kwargs)
|
||||||
|
|
||||||
def basic_prompt(self, info, default=None, is_password=False, is_bool=False,
|
def basic_prompt(self, info, default=None, is_password=False, is_bool=False,
|
||||||
|
|
Loading…
Reference in a new issue