Bug 1229337
| Summary: | [Python libnm-glib] NMClient.Client().get_manager_running() returns False if not run as root | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Tomáš Hozza <thozza> |
| Component: | NetworkManager | Assignee: | Lubomir Rintel <lkundrak> |
| Status: | CLOSED EOL | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | medium | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 22 | CC: | dcbw, psimerda, rkhan |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2016-07-19 19:49:49 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Tomáš Hozza
2015-06-08 13:39:55 UTC
The problem is that use should call new() function so that the client object is created as intended. Calling Client() only calls constructor but the object may not be properly initialized. See also related comment in NMClient constructor: http://cgit.freedesktop.org/NetworkManager/NetworkManager/tree/libnm-glib/nm-client.c#n1721 So, the code should be --- 8< ------------- #!/usr/bin/env python # using legacy libnm-glib from gi.repository import NMClient print (NMClient.Client().new().get_manager_running()) # using new libnm #from gi.repository import NM #print (NM.Client().new().get_nm_running()) ---8< ------------- Thanks for the info. However I still think that this is a bug. If calling NMClient.Client() will not create the NMClient object properly, it should not be allowed at all. The need to call NMClient.Client().new() is IMO too unintuitive. This package has changed ownership in the Fedora Package Database. Reassigning to the new owner of this component. Fedora 22 changed to end-of-life (EOL) status on 2016-07-19. Fedora 22 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. If you are unable to reopen this bug, please file a new report against the current release. If you experience problems, please add a comment to this bug. Thank you for reporting this bug and we are sorry it could not be fixed. |