/b-gtk/fix-viz

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/b-gtk/fix-viz

« back to all changes in this revision

Viewing changes to ui.py

  • Committer: Curtis Hovey
  • Date: 2012-02-27 15:39:37 UTC
  • mto: (776.2.1 ui-factory)
  • mto: This revision was merged to the branch mainline in revision 779.
  • Revision ID: sinzui.is@verizon.net-20120227153937-63m7vtilnhzhvm1v
Added a test for the common case of update().

Show diffs side-by-side

added added

removed removed

Lines of Context:
71
71
        if msg is not None:
72
72
            self.set_text(msg)
73
73
        if None not in (self.current, self.total):
74
 
            self.fraction = float(self.current) / self.total
75
 
            if self.fraction < 0.0 or self.fraction > 1.0:
 
74
            fraction = float(self.current) / self.total
 
75
            if fraction < 0.0 or fraction > 1.0:
76
76
                raise AssertionError
77
 
            self.set_fraction(self.fraction)
 
77
            self.set_fraction(fraction)
78
78
 
79
79
    @main_iteration
80
80
    def finished(self):