diff options
| author | jvoisin | 2015-11-25 19:29:18 +0100 |
|---|---|---|
| committer | jvoisin | 2015-11-26 15:47:30 +0100 |
| commit | 2212039d70ce5c4e97c3943bb82d4231c10e1260 (patch) | |
| tree | afd2aedcf6bb4c2a9fc82d6f3b2d0f7ad2d0fbb8 /nautilus | |
| parent | 9ea3c2cbc456bfa9a903eaa0ed6a42a34d12e1c2 (diff) | |
Make the logging more pep-282 compliant
See https://www.python.org/dev/peps/pep-0282/ for details,
but basically this is commit leaves the string
replacement to the logging function, instead of
doing it in place in its parameters with the '%' operator.
Diffstat (limited to 'nautilus')
| -rw-r--r-- | nautilus/nautilus-mat.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/nautilus/nautilus-mat.py b/nautilus/nautilus-mat.py index 11a47f3..cdce947 100644 --- a/nautilus/nautilus-mat.py +++ b/nautilus/nautilus-mat.py | |||
| @@ -36,17 +36,17 @@ class MatExtension(GObject.GObject, Nautilus.MenuProvider): | |||
| 36 | # We're only going to put ourselves on supported mimetypes' context menus | 36 | # We're only going to put ourselves on supported mimetypes' context menus |
| 37 | if not (file.get_mime_type() | 37 | if not (file.get_mime_type() |
| 38 | in [i["mimetype"] for i in libmat.mat.list_supported_formats()]): | 38 | in [i["mimetype"] for i in libmat.mat.list_supported_formats()]): |
| 39 | logging.debug("%s is not supported by MAT" % file.get_mime_type()) | 39 | logging.debug("%s is not supported by MAT", file.get_mime_type()) |
| 40 | return | 40 | return |
| 41 | 41 | ||
| 42 | # MAT can only handle local file: | 42 | # MAT can only handle local file: |
| 43 | if file.get_uri_scheme() != 'file': | 43 | if file.get_uri_scheme() != 'file': |
| 44 | logging.debug("%s files not supported by MAT" % file.get_uri_scheme()) | 44 | logging.debug("%s files not supported by MAT", file.get_uri_scheme()) |
| 45 | return | 45 | return |
| 46 | 46 | ||
| 47 | # MAT can not clean non-writable files | 47 | # MAT can not clean non-writable files |
| 48 | if not file.can_write(): | 48 | if not file.can_write(): |
| 49 | logging.debug("%s is not writable by MAT" % file.get_uri_scheme()) | 49 | logging.debug("%s is not writable by MAT", file.get_uri_scheme()) |
| 50 | return | 50 | return |
| 51 | 51 | ||
| 52 | item = Nautilus.MenuItem(name="Nautilus::clean_metadata", | 52 | item = Nautilus.MenuItem(name="Nautilus::clean_metadata", |
