Changeset 451

Show
Ignore:
Timestamp:
05/12/08 09:31:24 (8 months ago)
Author:
jmowery
Message:

make list clients in group work
several small syntax fixes
for some reason have to loop and append to list in tuple rather than concatenate (language 'feature')

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/trunk-pmd-intproto/mgmt/manager.py

    r450 r451  
    149149                                print 'File \'' + file_name + '\' does not exist' 
    150150                        else: 
    151                                 files.append((os.path.realpath(os.path.expanduser(file_name))), file_util.checksum(file_name)) 
     151                                files.append((os.path.realpath(os.path.expanduser(file_name)), file_util.checksum(file_name))) 
    152152                if len(files) != len(argv[1:]): 
    153153                        sys.exit(1) 
    154154                msg = m.add_message(argv[0]) 
    155                 msg.body[1] += files 
     155                for f in files: 
     156                        msg.body[1].append(f) 
    156157        elif cmd == 'remove': 
    157158                files = [os.path.basename(x) for x in argv[1:]] 
    158159                msg = m.remove_message(argv[0]) 
    159                 msg.body[1] += files 
     160                for f in files: 
     161                        msg.body[1].append(f) 
    160162        else: 
    161163                print "unknown command" 
     
    201203                                sys.exit(1) 
    202204                        msg = mgr.list_clients() 
    203                         msg.body = argv[2
     205                        msg.body = argv[2:
    204206                else: 
    205207                        print 'unknown client list request' 
  • branches/trunk-pmd-intproto/server/master.py

    r450 r451  
    109109                        msg.body = l.list_nodes() 
    110110                else: 
    111                         msg.body = [] 
     111                        msg.body = targetexpand(('group', msg.body)) 
    112112                return msg 
    113113