Revision dbf466eb image_creator/dialog_main.py

b/image_creator/dialog_main.py
146 146

  
147 147
    MB = 2 ** 20
148 148

  
149
    size = (dev.meta['SIZE'] + MB - 1) // MB
149
    size = (dev.size + MB - 1) // MB
150 150
    shrinked = 'shrinked' in session and session['shrinked']
151 151
    postfix = " (shrinked)" if shrinked else ''
152 152

  
......
205 205
        try:
206 206
            dev = session['device']
207 207
            if "checksum" not in session:
208
                size = dev.meta['SIZE']
208
                size = dev.size
209 209
                md5 = MD5(out)
210 210
                session['checksum'] = md5.compute(session['snapshot'], size)
211 211

  
......
237 237

  
238 238
def upload_image(session):
239 239
    d = session["dialog"]
240
    size = session['device'].meta['SIZE']
240
    size = session['device'].size
241 241

  
242 242
    if "account" not in session:
243 243
        d.msgbox("You need to provide your ~okeanos login username before you "

Also available in: Unified diff