- Timestamp:
- Jan 31, 2010, 9:14:30 PM (15 years ago)
- Location:
- trunk/packages/invirt-images
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/packages/invirt-images/debian/changelog
r1854 r2974 1 invirt-images (0.0.3) unstable; urgency=low 2 3 * Add status messages; continue after failed downloads. 4 5 -- Quentin Smith <quentin@mit.edu> Sun, 31 Jan 2010 21:13:32 -0500 6 1 7 invirt-images (0.0.2) unstable; urgency=low 2 8 -
trunk/packages/invirt-images/invirt-images
r1365 r2974 3 3 from invirt import database 4 4 import os 5 import sys 5 6 import subprocess 6 7 import random … … 110 111 full_uri = os.path.join(cdrom.mirror.uri_prefix, cdrom.uri_suffix) 111 112 temp_file = tempfile.mkstemp()[1] 113 if verbosity > 0: 114 print >>sys.stderr, "Fetching image %s from %s to %s" % (cdrom.cdrom_id, full_uri, temp_file) 112 115 try: 113 116 if full_uri.startswith('rsync://'): … … 142 145 temp_file = fetch_image(cdrom) 143 146 try: 144 cdrom_size = '%sM' % math.ceil((float(os.stat(temp_file).st_size) / (1024 * 1024))) 147 st_size = os.stat(temp_file).st_size 148 if not st_size: 149 print >>sys.stderr, "Failed to fetch %s" % cdrom.cdrom_id 150 return 151 cdrom_size = '%sM' % math.ceil((float(st_size) / (1024 * 1024))) 145 152 new_lv = lvcreate_random('image-new_%s_%%s' % cdrom.cdrom_id, cdrom_size) 146 153 copy_file(temp_file, '/dev/xenvg/%s' % new_lv)
Note: See TracChangeset
for help on using the changeset viewer.