Skip to content

Commit

Permalink
[cli] print traceback fully if the verbose flag is passed
Browse files Browse the repository at this point in the history
  • Loading branch information
edoput committed Sep 6, 2017
1 parent c8e3daf commit 9a18b3f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions bin/netjsonconfig
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import sys
import six
import argparse
import netjsonconfig
import traceback

description = """
Converts a NetJSON DeviceConfiguration object to native router configurations.
Expand Down Expand Up @@ -198,5 +199,8 @@ except netjsonconfig.exceptions.ValidationError as e:
print(message + info)
sys.exit(4)
except TypeError as e:
if args.verbose:
traceback.print_exc()

print('netjsonconfig: {0}'.format(e))
sys.exit(5)

0 comments on commit 9a18b3f

Please sign in to comment.