Use enums to describe target WPS state.

To avoid confusion about wps = True/False/None.
Came about because of #130
This commit is contained in:
derv82
2018-09-09 10:39:57 -07:00
parent 355f891d0f
commit e190794149
8 changed files with 38 additions and 24 deletions

View File

@@ -97,6 +97,10 @@ class Color(object):
'''Prints an exception. Includes stack trace if necessary.'''
Color.pl('\n{!} {R}Error: {O}%s' % str(exception))
# Don't dump trace for the "no targets found" case.
if 'No targets found' in str(exception):
return
from ..config import Configuration
if Configuration.verbose > 0 or Configuration.print_stack_traces:
Color.pl('\n{!} {O}Full stack trace below')