1111import os
1212import time
1313from inspect import getsourcelines
14- from traceback import print_exc , print_tb as print_traceback
14+ from traceback import print_tb as print_traceback
1515import argparse
1616import subprocess
1717import re
@@ -1602,7 +1602,6 @@ def __pretty_print_fc_exception(e):
16021602 if isinstance (code , str ):
16031603 preface = ''
16041604 source = ''
1605- print_exc (2 )
16061605 msg = "{0}" .format (e )
16071606
16081607 print ("{0}{1}{2}: {3}" .format (preface , code , source , msg ))
@@ -1616,7 +1615,7 @@ def printToCLI(value):
16161615 if header :
16171616 print ('\t ' .join (header ))
16181617 for k , v in sorted (value .items ()):
1619- print (u ( " {0}\t {1}" .format (k ,v ) ))
1618+ print (u' {0}\t {1}' .format (k , v ))
16201619 elif isinstance (value , (list , tuple )):
16211620 list (map (lambda v : print (v ), value ))
16221621 elif not isinstance (value , int ):
@@ -2007,12 +2006,13 @@ def main(argv=None):
20072006 subp .set_defaults (func = health )
20082007
20092008 subp = subparsers .add_parser ('attr_get' ,
2010- description = 'Retrieve values of attribute(s) from given entity' ,
2009+ description = 'Retrieve attribute values from an entity identified by ' \
2010+ 'name and type. If either name or type are omitted then workspace ' \
2011+ 'attributes will be returned.' ,
20112012 parents = [workspace_parent , attr_parent ])
20122013
20132014 # etype_parent not used for attr_get, because entity type is optional
20142015 etype_help = 'Entity type to retrieve annotations from. '
2015- etype_help += 'If omitted, workspace attributes will be retrieved'
20162016 etype_choices = ['participant' , 'participant_set' , 'sample' , 'sample_set' ,
20172017 'pair' , 'pair_set' ]
20182018 subp .add_argument ('-t' , '--entity-type' , choices = etype_choices ,
0 commit comments