Check-in [b07302139d]
Not logged in
Overview
Comment:Incremented version number to 0.2
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: b07302139dee98e27522ab32037f59d7e8011b3c
User & Date: vitus on 2015-12-17 14:31:21
Other Links: manifest | tags
Context
2015-12-18
05:26
Added try-finally to the vws command execution. Fixes [5a1bd05199] check-in: daa18d8131 user: vitus tags: trunk
2015-12-17
14:31
Incremented version number to 0.2 check-in: b07302139d user: vitus tags: trunk
14:27
Added shutdown of socket before exit check-in: a816083630 user: vitus tags: trunk
Changes

Modified vws from [aaa1316acd] to [efb0c40873].

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/usr/bin/python
from ConfigParser import ConfigParser
from argparse import ArgumentParser
import fcntl
import socket,select
import errno
import re
import os,sys,time
VERSION=0.1
def find_vm(name):
    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








|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/usr/bin/python
from ConfigParser import ConfigParser
from argparse import ArgumentParser
import fcntl
import socket,select
import errno
import re
import os,sys,time
VERSION=0.2
def find_vm(name):
    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
255
256
257
258
259
260
261

262
263
264
265
266
267
268
                line.find("media=disk")>-1):
                m=re.search("file=([^,\s]*)",line)
                if m:
                    result.append(m.group(1))
    return result

def cmd_snapshot(options):

    if not options.stopped:
        print >>sys.stderr,"Cannot make snapshot of running VW"
        return 1
    drives=get_drives(options.dir)
    os.chdir(options.dir)
    newnames={}
    for i in drives:







>







255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
                line.find("media=disk")>-1):
                m=re.search("file=([^,\s]*)",line)
                if m:
                    result.append(m.group(1))
    return result

def cmd_snapshot(options):
    import os.path
    if not options.stopped:
        print >>sys.stderr,"Cannot make snapshot of running VW"
        return 1
    drives=get_drives(options.dir)
    os.chdir(options.dir)
    newnames={}
    for i in drives: