Revision 61d14323 image_creator/dialog_menu.py

b/image_creator/dialog_menu.py
33 33
# interpreted as representing official policies, either expressed
34 34
# or implied, of GRNET S.A.
35 35

  
36
import sys
37 36
import os
38 37
import textwrap
39 38
import StringIO
......
65 64
]
66 65

  
67 66

  
68
class metadata_monitor(object):
67
class MetadataMonitor(object):
69 68
    def __init__(self, session, meta):
70 69
        self.session = session
71 70
        self.meta = meta
......
554 553
                            del session['checksum']
555 554

  
556 555
                        # Monitor the metadata changes during syspreps
557
                        with metadata_monitor(session, image_os.meta):
556
                        with MetadataMonitor(session, image_os.meta):
558 557
                            image_os.do_sysprep()
559 558
                            infobox.finalize()
560 559

  
......
590 589

  
591 590
    if not d.yesno("%s\n\nDo you want to continue?" % msg, width=WIDTH,
592 591
                   height=12, title="Image Shrinking"):
593
        with metadata_monitor(session, dev.meta):
592
        with MetadataMonitor(session, dev.meta):
594 593
            infobox = InfoBoxOutput(d, "Image Shrinking", height=4)
595 594
            dev.out.add(infobox)
596 595
            try:
......
640 639

  
641 640
def main_menu(session):
642 641
    d = session['dialog']
643
    dev = session['device']
644 642

  
645 643
    update_background_title(session)
646 644

  

Also available in: Unified diff