blob: 231f8e29b7563a9934c5e0330f47e38f963b9d9e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
--- a/usr/lib/linuxmint/mintlocale/im.py
+++ b/usr/lib/linuxmint/mintlocale/im.py
@@ -1,10 +1,8 @@
#!/usr/bin/python3
-import apt
import codecs
import gettext
import locale
-import aptkit.simpleclient
import os
try:
@@ -19,6 +17,13 @@
from gi.repository import Gtk, GObject, Gdk, XApp
from ImConfig.ImConfig import ImConfig
+
+# Used to detect Debian derivatives (we don't want to show APT features in other distros)
+IS_DEBIAN = os.path.exists("/etc/debian_version")
+
+if IS_DEBIAN:
+ import apt
+ import aptkit.simpleclient
# i18n
APP = 'mintlocale'
@@ -38,7 +43,8 @@
self.app = app
self.packages = []
self.missing_packages = []
- self.apt = aptkit.simpleclient.SimpleAPTClient(self.app.window)
+ if IS_DEBIAN:
+ self.apt = aptkit.simpleclient.SimpleAPTClient(self.app.window)
self.button = button
self.button.connect('clicked', self.install)
self.button.set_sensitive(False)
|