Bug 1414078 - sepolicy gui tracebacks: NameError: global name 'compare' is not defined
Summary: sepolicy gui tracebacks: NameError: global name 'compare' is not defined
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: policycoreutils
Version: 25
Hardware: x86_64
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Petr Lautrbach
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-01-17 17:08 UTC by Milos Malik
Modified: 2017-01-24 15:40 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1420482 (view as bug list)
Environment:
Last Closed: 2017-01-24 15:40:42 UTC
Type: Bug


Attachments (Terms of Use)

Description Milos Malik 2017-01-17 17:08:06 UTC
Description of problem:
* happens when sepolicy gui is executed in SSH terminal

NVRs:
checkpolicy-2.6-0.1.fc25.x86_64
libselinux-2.6-0.1.fc25.x86_64
libselinux-devel-2.6-0.1.fc25.x86_64
libselinux-python-2.6-0.1.fc25.x86_64
libselinux-python3-2.6-0.1.fc25.x86_64
libselinux-utils-2.6-0.1.fc25.x86_64
libsemanage-2.6-0.2.fc25.x86_64
libsemanage-devel-2.6-0.2.fc25.x86_64
libsemanage-python-2.6-0.2.fc25.x86_64
libsemanage-python3-2.6-0.2.fc25.x86_64
libsepol-2.6-0.1.fc25.x86_64
libsepol-devel-2.6-0.1.fc25.x86_64
libsepol-static-2.6-0.1.fc25.x86_64
policycoreutils-2.6-0.2.fc25.x86_64
policycoreutils-devel-2.6-0.2.fc25.x86_64
policycoreutils-gui-2.6-0.2.fc25.x86_64
policycoreutils-python-2.6-0.2.fc25.x86_64
policycoreutils-python3-2.6-0.2.fc25.x86_64
policycoreutils-python-utils-2.6-0.2.fc25.x86_64
policycoreutils-sandbox-2.6-0.2.fc25.x86_64
python-2.7.12-7.fc25.x86_64
python3-3.5.2-4.fc25.x86_64
selinux-policy-3.13.1-225.6.fc25.noarch
selinux-policy-devel-3.13.1-225.6.fc25.noarch
selinux-policy-sandbox-3.13.1-225.6.fc25.noarch
selinux-policy-targeted-3.13.1-225.6.fc25.noarch
setools-console-4.0.1-0.2.fc25.x86_64
setools-python3-4.0.1-0.2.fc25.x86_64
setools-python-4.0.1-0.2.fc25.x86_64

Steps to Reproduce:
# sepolicy gui
Unable to init server: Could not connect: Connection refused
Unable to init server: Could not connect: Connection refused
/usr/lib/python2.7/site-packages/sepolicy/gui.py:29: PyGIWarning: Gtk was imported without specifying a version first. Use gi.require_version('Gtk', '3.0') before import to ensure that the right version gets loaded.
  from gi.repository import Gtk
Traceback (most recent call last):
  File "/usr/bin/sepolicy", line 700, in <module>
    args.func(args)
  File "/usr/bin/sepolicy", line 326, in gui_run
    sepolicy.gui.SELinuxGui(args.domain, args.test)
  File "/usr/lib/python2.7/site-packages/sepolicy/gui.py", line 119, in __init__
    sepolicy_domains.sort(compare)
NameError: global name 'compare' is not defined
#

Expected results:
* no tracebacks

Comment 1 Petr Lautrbach 2017-01-24 15:40:42 UTC
Fixed in policycoreutils-2.6-0.5


Note You need to log in before you can comment on or make changes to this bug.