Skip to content

Commit

Permalink
Only show the used language profile if a custom one is used
Browse files Browse the repository at this point in the history
This should make the output less verbose
  • Loading branch information
Gagi2k authored and rgriebl committed Aug 1, 2024
1 parent f6ec11c commit f838f9c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions qface/idl/listener.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,14 @@ def escape_decode(s):
class QFaceListener(TListener):
def __init__(self, system, profile=EProfile.FULL):
super().__init__()
click.secho('qface uses language profile: {}'.format(profile), fg='blue')
if profile != EProfile.FULL:
log.secho('qface uses language profile: {}'.format(profile), fg='blue')
self.lang_features = get_features(profile)
self.system = system or System() # type:System

def check_support(self, feature, report=True):
if feature not in self.lang_features and report:
click.secho('Unsuported language feature: {}'.format(EFeature.IMPORT), fg='red')
log.error('Unsuported language feature: {}'.format(EFeature.IMPORT), fg='red')
return False
return True

Expand Down

0 comments on commit f838f9c

Please sign in to comment.