/usr/lib/python3/dist-packages/UnityTweakTool/__init__.py:136: SyntaxWarning: "is not" with a literal.

Bug #1877867 reported by DEnis
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Unity Tweak Tool
Invalid
Undecided
Unassigned

Bug Description

Linux big 5.4.0-28-generic #32-Ubuntu SMP Wed Apr 22 17:40:10 UTC 2020 x86_64 x86_64 x86_64
DISTRIB_RELEASE=20.04

$ apt search unity-tweak-tool
Sorting... Done
Full Text Search... Done
unity-tweak-tool/focal,focal,now 0.0.7+-0ubuntu6 all [installed]
  configuration tool for the Unity desktop environment

user@big:~$ sudo apt install unity-tweak-tool
[sudo] password for user:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  gnome-software-common lib32mpx2 libavutil55 libdvdread4 libisc-export169 liblivemedia62 liblqr-1-0
  libnm-util2 libsignon-glib1 libstrictures-perl libstruct-dumb-perl libx32ubsan0 libxcb-shape0-dev
  libxml-simple-perl linux-image-4.15.0-99-generic linux-modules-4.15.0-99-generic
  linux-modules-extra-4.15.0-99-generic node-ansi-color-table python-cffi-backend python-crypto
  python-pyasn1 python-six python3-lxml x11proto-xf86vidmode-dev
Use 'sudo apt autoremove' to remove them.
The following NEW packages will be installed:
  unity-tweak-tool
0 upgraded, 1 newly installed, 0 to remove and 39 not upgraded.
Need to get 370 kB of archives.
After this operation, 2.786 kB of additional disk space will be used.
Get:1 http://de.archive.ubuntu.com/ubuntu focal/universe amd64 unity-tweak-tool all 0.0.7+-0ubuntu6 [370 kB]
Fetched 370 kB in 0s (1.312 kB/s)
Selecting previously unselected package unity-tweak-tool.
(Reading database ... 356039 files and directories currently installed.)
Preparing to unpack .../unity-tweak-tool_0.0.7+-0ubuntu6_all.deb ...
Unpacking unity-tweak-tool (0.0.7+-0ubuntu6) ...
Setting up unity-tweak-tool (0.0.7+-0ubuntu6) ...

!!!!!!!!!!!!!!!!
/usr/lib/python3/dist-packages/UnityTweakTool/__init__.py:136: SyntaxWarning: "is not" with a literal.
 Did you mean "!="?
  assert id is not -1
/usr/lib/python3/dist-packages/UnityTweakTool/section/spaghetti/theme.py:155: SyntaxWarning: "is" with
 a literal. Did you mean "=="?
  self.ui['check_cursor_size'].set_active(True if gsettings.interface.get_int('cursor-size') is 48 els
e False)
Processing triggers for desktop-file-utils (0.24-1ubuntu2) ...
Processing triggers for mime-support (3.64ubuntu1) ...
Processing triggers for hicolor-icon-theme (0.17-2) ...
Processing triggers for gnome-menus (3.36.0-1ubuntu1) ...
Processing triggers for libglib2.0-0:amd64 (2.64.2-1~fakesync1) ...
Processing triggers for man-db (2.9.1-1) ...
Processing triggers for bamfdaemon (0.5.3+18.04.20180207.2-0ubuntu2) ...
Rebuilding /usr/share/applications/bamf-2.index...

Revision history for this message
DEnis (p-d) wrote :

sorry use gnome and selected wrong packet. Should be "gnome-tweak-tool"

Case can be closed.

Revision history for this message
DEnis (p-d) wrote :

sorry use gnome and selected wrong packet. Should be "gnome-tweak-tool"

Case can be closed and removed.

Changed in unity-tweak-tool:
status: New → Invalid
Revision history for this message
Clement Guillaume (guillaumecle) wrote :

I'm using unity on Ubuntu 20.04.1 LTS and got the same warning

Setting up unity-tweak-tool (0.0.7+-0ubuntu6) ...
/usr/lib/python3/dist-packages/UnityTweakTool/__init__.py:136: SyntaxWarning: "is not" with a literal. Did you mean "!="?
  assert id is not -1
/usr/lib/python3/dist-packages/UnityTweakTool/section/spaghetti/theme.py:155: SyntaxWarning: "is" with a literal. Did you mean "=="?
  self.ui['check_cursor_size'].set_active(True if gsettings.interface.get_int('cursor-size') is 48 else False)

Revision history for this message
Jeff Sereno (jsereno) wrote :

I'm also trying to install the Unity Tweak Tool (NOT Gnome Tweaks) for the purpose of enabling proper workspaces, and I too also get the same error.

Setting up unity-tweak-tool (0.0.7+-0ubuntu6) ...
/usr/lib/python3/dist-packages/UnityTweakTool/__init__.py:136: SyntaxWarning: "is not" with a literal. Did you mean "!="?
  assert id is not -1
/usr/lib/python3/dist-packages/UnityTweakTool/section/spaghetti/theme.py:155: SyntaxWarning: "is" with a literal. Did you mean "=="?
  self.ui['check_cursor_size'].set_active(True if gsettings.interface.get_int('cursor-size') is 48 else False)

Revision history for this message
Jeff Sereno (jsereno) wrote :

It would appear not long ago, the Unity Tweak Tool DID work in 20.04, at least back in May 2020 anyway: https://www.youtube.com/watch?v=UoPvVf1d5PQ

Revision history for this message
Don R. (highlander411) wrote :

Ummmm.... If this is the wrong package then shouldn't there be a simple check when the app fires? Sorry I haven't taken the time to Google how to accomplish this in python but it's a doable task.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.