Overview
Comment: | Fixed running without config file |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
d4f4a7b3f1773771d7cab4f7d6e9684b |
User & Date: | vitus on 2015-11-09 18:29:25 |
Other Links: | manifest | tags |
Context
2015-11-10
| ||
08:05 | Fixed start option check-in: 64171aea54 user: vitus tags: trunk | |
2015-11-09
| ||
18:29 | Fixed running without config file check-in: d4f4a7b3f1 user: vitus tags: trunk | |
15:34 | make some commands work. check-in: fa99d9b0d0 user: vitus tags: trunk | |
Changes
Modified vws from [90a91c6680] to [dd99cdcccb].
1 2 3 4 5 6 7 8 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | - | #!/usr/bin/python from ConfigParser import ConfigParser from argparse import ArgumentParser import fcntl import socket import errno import re import os,sys |
︙ | |||
104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 | 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 | + + + + - - + + | def cmd_usb_remove(options): raise NotImplementedError def cmd_usb_attached(options): answer=send_command(options.sock,"info usb") print answer def cmd_list(options): count = 0 search_path=[os.environ['HOME']+"/VWs", config.get("directories","SharedVMs"), config.get("directories","AutostartVMs")] for dirname in search_path: if not os.access(dirname+"/.",os.X_OK): continue for vmname in os.listdir(dirname): if os.access(dirname+"/"+vmname+"/start",os.X_OK): count += 1 print vmname if not count: sys.exit(1) # # Utility functions for arg parsing # def new_command(cmds,name,**kwargs): """ Adds a subparser and adds a machine name argument to it """ p=cmds.add_parser(name,**kwargs) p.add_argument('machine',type=str,help='name of vm to operate on') return p # # arg parsing # config=ConfigParser({'SharedVMs':'/var/cache/vws/shared', |
︙ |