Changeset b766352 in mainline


Ignore:
Timestamp:
2010-01-04T23:19:22Z (14 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
6064dab
Parents:
8786aa5
Message:

add support for implicit choices even in text-based configuration

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tools/xtui.py

    r8786aa5 rb766352  
    213213                        sys.stdout.write("Selection[%s]: " % str(position + 1))
    214214                else:
    215                         sys.stdout.write("Selection: ")
     215                        if (cnt > 0):
     216                                sys.stdout.write("Selection[1]: ")
     217                        else:
     218                                sys.stdout.write("Selection[0]: ")
    216219                inp = sys.stdin.readline()
    217220               
     
    222225                        if (position != None):
    223226                                return (None, position)
    224                         continue
     227                        else:
     228                                if (cnt > 0):
     229                                        inp = '1'
     230                                else:
     231                                        inp = '0'
    225232               
    226233                if (inp.strip() == 'q'):
Note: See TracChangeset for help on using the changeset viewer.