Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
A
apertis-tests
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Frédéric Dalleau
apertis-tests
Commits
91d8ef92
Commit
91d8ef92
authored
9 years ago
by
Xavier Claessens
Committed by
Sjoerd Simons
9 years ago
Browse files
Options
Downloads
Patches
Plain Diff
tracker: port to python3
Reviewers: smcv, pwith Differential Revision:
https://phabricator.apertis.org/D413
parent
6d7a745f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
tracker/automated/test-tracker.py
+3
-3
3 additions, 3 deletions
tracker/automated/test-tracker.py
tracker/common.py
+1
-1
1 addition, 1 deletion
tracker/common.py
tracker/manual/test-removable-device.py
+1
-1
1 addition, 1 deletion
tracker/manual/test-removable-device.py
with
5 additions
and
5 deletions
tracker/automated/test-tracker.py
+
3
−
3
View file @
91d8ef92
#! /usr/bin/python
#! /usr/bin/python
3
# -*- 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
))
...
...
This diff is collapsed.
Click to expand it.
tracker/common.py
+
1
−
1
View file @
91d8ef92
...
...
@@ -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
)
...
...
This diff is collapsed.
Click to expand it.
tracker/manual/test-removable-device.py
+
1
−
1
View file @
91d8ef92
#! /usr/bin/python
#! /usr/bin/python
3
# -*- coding: utf-8 -*-
# Copyright © 2015 Collabora Ltd.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment