Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
S
scom
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
SulinOS
scom
Commits
5a5adb9f
Kaydet (Commit)
5a5adb9f
authored
Ara 30, 2009
tarafından
Bahadır Kandemir
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Use DBus frontend in desktop environment
üst
fe580565
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
1 deletion
+12
-1
__init__.py
api/comar/__init__.py
+12
-1
No files found.
api/comar/__init__.py
Dosyayı görüntüle @
5a5adb9f
...
...
@@ -129,7 +129,18 @@ class Call:
raise
AttributeError
,
"Package name required for non-async calls."
def
queryPolicyKit
(
self
,
action
):
if
not
self
.
link
.
use_agent
:
if
self
.
link
.
use_agent
:
bus
=
dbus
.
SessionBus
()
try
:
obj
=
bus
.
get_object
(
"org.freedesktop.PolicyKit.AuthenticationAgent"
,
"/"
)
except
dbus
.
DBusException
,
exception
:
return
False
iface
=
dbus
.
Interface
(
obj
,
"org.freedesktop.PolicyKit.AuthenticationAgent"
)
try
:
return
iface
.
ObtainAuthorization
(
action
,
0
,
os
.
getpid
(),
timeout
=
2
**
16
-
1
)
==
1
except
:
return
False
else
:
os
.
environ
[
"POLKIT_AUTH_FORCE_TEXT"
]
=
"1"
ret
=
subprocess
.
call
([
"/usr/bin/polkit-auth"
,
"--obtain"
,
action
])
if
ret
==
0
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment