~ubuntu-branches/ubuntu/oneiric/oggconvert/oneiric

« back to all changes in this revision

Viewing changes to debian/patches/02_TypeError_fix.dpatch

  • Committer: Bazaar Package Importer
  • Author(s): Luca Falavigna
  • Date: 2008-01-14 11:19:08 UTC
  • Revision ID: james.westby@ubuntu.com-20080114111908-izixj0zs6abjsedl
Tags: 0.3.0-2ubuntu1
* Merge from Debian unstable. Fix LP: #180172
  Remaining Ubuntu changes:
  - Suggest gstreamer multiverse plugins

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#! /bin/sh /usr/share/dpatch/dpatch-run
 
2
## 02_prova.dpatch by Luca Falavigna <dktrkranz@ubuntu.com>
 
3
## DP: Fix TypeError exception.
 
4
 
 
5
@DPATCH@
 
6
diff -urNad oggconvert-0.3.0~/OggConvert/ocv_in_progress.py oggconvert-0.3.0/OggConvert/ocv_in_progress.py
 
7
--- oggconvert-0.3.0~/OggConvert/ocv_in_progress.py     2007-11-24 22:12:46.000000000 +0100
 
8
+++ oggconvert-0.3.0/OggConvert/ocv_in_progress.py      2008-01-13 23:24:41.000000000 +0100
 
9
@@ -90,7 +90,10 @@
 
10
             
 
11
     def _update_progressbar(self):
 
12
         pos = self._transcoder.get_position()
 
13
-        completed = float(pos)/self._duration
 
14
+        if pos:
 
15
+            completed = float(pos)/self._duration
 
16
+        else:
 
17
+            completed = 1
 
18
         percent = 100*completed
 
19
         elapsed = self._timer.get_elapsed()
 
20