Guest User

Untitled

a guest
Dec 21st, 2024
392
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.00 KB | None | 0 0
  1. --- a/usr/lib/linuxmint/mintlocale/im.py
  2. +++ b/usr/lib/linuxmint/mintlocale/im.py
  3. @@ -1,10 +1,8 @@
  4. #!/usr/bin/python3
  5.  
  6. -import apt
  7. import codecs
  8. import gettext
  9. import locale
  10. -import aptkit.simpleclient
  11. import os
  12.  
  13. try:
  14. @@ -19,6 +19,13 @@
  15. from gi.repository import Gtk, GObject, Gdk, XApp
  16.  
  17. from ImConfig.ImConfig import ImConfig
  18. +
  19. +# Used to detect Debian derivatives (we don't want to show APT features in other distros)
  20. +IS_DEBIAN = os.path.exists("/etc/debian_version")
  21. +
  22. +if IS_DEBIAN:
  23. + import apt
  24. + import mintcommon.aptdaemon
  25.  
  26. # i18n
  27. APP = 'mintlocale'
  28. @@ -43,7 +43,8 @@
  29. self.app = app
  30. self.packages = []
  31. self.missing_packages = []
  32. - self.apt = aptkit.simpleclient.SimpleAPTClient(self.app.window)
  33. + if IS_DEBIAN:
  34. + self.apt = aptkit.simpleclient.SimpleAPTClient(self.app.window)
  35. self.button = button
  36. self.button.connect('clicked', self.install)
  37. self.button.set_sensitive(False)
  38.  
  39.  
Advertisement
Add Comment
Please, Sign In to add comment