Skip to content
Snippets Groups Projects
Commit 91d8ef92 authored by Xavier Claessens's avatar Xavier Claessens Committed by Sjoerd Simons
Browse files

tracker: port to python3

Reviewers: smcv, pwith

Differential Revision: https://phabricator.apertis.org/D413
parent 6d7a745f
No related branches found
No related tags found
No related merge requests found
#! /usr/bin/python
#! /usr/bin/python3
# -*- coding: utf-8 -*-
# Copyright © 2015 Collabora Ltd.
......@@ -10,7 +10,7 @@
import unittest
import os
import md5
import hashlib
import sys
from gi.repository import GLib
......@@ -76,7 +76,7 @@ class TrackerTest(unittest.TestCase):
# Note that this is the path for local storage only, not for removable
# devices.
uri = 'file://%s/%s' % (self.homedir, filename)
uri_hash = md5.new(uri).hexdigest()
uri_hash = hashlib.md5(bytes(uri, encoding='UTF-8')).hexdigest()
path = '%s/.cache/thumbnails/normal/%s.png' % (self.homedir, uri_hash)
self.assertTrue(os.path.isfile(path))
......
......@@ -28,7 +28,7 @@ class TrackerIndexer():
'systemctl --user stop tracker-store tracker-miner-fs',
shell=True)
subprocess.check_call('tracker-control -r',
stdout=open(os.devnull, 'wb'),
stdout=subprocess.DEVNULL,
shell=True)
self.loop = GLib.MainLoop.new(None, False)
......
#! /usr/bin/python
#! /usr/bin/python3
# -*- coding: utf-8 -*-
# Copyright © 2015 Collabora Ltd.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment