Initial pass on python 3 port

Given the imminent end-of-life for Python 2, I didn't bother making the
codebase compatible with both.

Signed-off-by: Drew DeVault <sir@cmpwn.com>
This commit is contained in:
Drew DeVault
2019-08-10 11:45:17 +09:00
committed by JoeLametta
parent f740a0ef0d
commit 64dd9d843a
33 changed files with 274 additions and 317 deletions

View File

@@ -18,7 +18,6 @@
# You should have received a copy of the GNU General Public License
# along with whipper. If not, see <http://www.gnu.org/licenses/>.
from __future__ import print_function
import logging
import sys
@@ -484,7 +483,7 @@ class SyncRunner(TaskRunner, ITaskListener):
self._task.addListener(self)
# only start the task after going into the mainloop,
# otherwise the task might complete before we are in it
GLib.timeout_add(0L, self._startWrap, self._task)
GLib.timeout_add(0, self._startWrap, self._task)
self.debug('run loop')
self._loop.run()
@@ -525,7 +524,7 @@ class SyncRunner(TaskRunner, ITaskListener):
self.stopped(task)
raise
GLib.timeout_add(int(delta * 1000L), c)
GLib.timeout_add(int(delta * 1000), c)
# ITaskListener methods
def progressed(self, task, value):