Revision 0f0137fc image_creator/os_type/windows.py

b/image_creator/os_type/windows.py
49 49
import string
50 50
import subprocess
51 51
import struct
52
import re
52 53

  
53 54
# For more info see: http://technet.microsoft.com/en-us/library/jj612867.aspx
54 55
KMS_CLIENT_SETUP_KEYS = {
......
255 256
            #   The maximum number of reclaimable bytes is: xxxx MB
256 257
            #
257 258
            if line.find('reclaimable') >= 0:
258
                querymax = line.split(':')[1].split()[0].strip()
259
                assert querymax.isdigit(), \
260
                    "Number of reclaimable bytes not a number"
259
                answer = line.split(':')[1].strip()
260
                m = re.search('(\d+) MB', answer)
261
                if m:
262
                    querymax = m.group(1)
263
                else:
264
                    FatalError(
265
                        "Unexpected output for `shrink querymax' command: %s" %
266
                        line)
261 267

  
262 268
        if querymax is None:
263 269
            FatalError("Error in shrinking! "

Also available in: Unified diff