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
cfb8473c
Kaydet (Commit)
cfb8473c
authored
Şub 02, 2009
tarafından
Bahadır Kandemir
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Support for COMAR 3.0
üst
acbd8011
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
5 deletions
+17
-5
ChangeLog
api/ChangeLog
+4
-0
__init__.py
api/comar/__init__.py
+13
-5
No files found.
api/ChangeLog
Dosyayı görüntüle @
cfb8473c
2009-02-01 Bahadır Kandemir <bahadir@pardus.org.tr>
* api: Support COMAR 3.0
2008-10-27 Bahadır Kandemir <bahadir@pardus.org.tr>
* comar: New release. Good old friend, Link() is back.
...
...
api/comar/__init__.py
Dosyayı görüntüle @
cfb8473c
...
...
@@ -66,7 +66,7 @@ class Call:
def
handleResult
(
*
result
):
self
.
async
(
self
.
package
,
None
,
result
)
def
handleError
(
exception
):
if
"policy.auth"
in
exception
.
_dbus_error_name
:
if
"policy.auth"
in
exception
.
_dbus_error_name
or
"Comar.PolicyKit"
in
exception
.
_dbus_error_name
:
action
=
exception
.
get_dbus_message
()
if
self
.
queryPolicyKit
(
action
):
return
self
.
call
(
*
args
,
**
kwargs
)
...
...
@@ -118,12 +118,12 @@ class Call:
met
=
getattr
(
obj
,
self
.
method
)
try
:
return
met
(
dbus_interface
=
"
%
s.
%
s.
%
s"
%
(
self
.
link
.
interface
,
self
.
group
,
self
.
class_
),
timeout
=
self
.
timeout
,
*
args
)
except
dbus
.
DBusException
,
e
:
if
"policy.auth"
in
e
.
_dbus_error_name
:
action
=
e
.
get_dbus_message
()
except
dbus
.
DBusException
,
e
xception
:
if
"policy.auth"
in
e
xception
.
_dbus_error_name
or
"Comar.PolicyKit"
in
exception
.
_dbus_error_name
:
action
=
e
xception
.
get_dbus_message
()
if
self
.
queryPolicyKit
(
action
):
return
self
.
call
(
*
args
,
**
kwargs
)
raise
dbus
.
DBusException
,
e
raise
dbus
.
DBusException
,
e
xception
else
:
raise
AttributeError
,
"Package name required for non-async calls."
...
...
@@ -167,6 +167,14 @@ class Link:
handler
(
package
,
signal
,
args
)
self
.
bus
.
add_signal_receiver
(
sigHandler
,
dbus_interface
=
"
%
s.
%
s"
%
(
self
.
interface
,
model
),
member_keyword
=
"signal"
,
path_keyword
=
"path"
)
def
register
(
self
,
app
,
model
,
script
):
obj
=
self
.
bus
.
get_object
(
self
.
address
,
'/'
,
introspect
=
False
)
obj
.
register
(
app
,
model
,
script
,
dbus_interface
=
self
.
interface
)
def
remove
(
self
,
app
):
obj
=
self
.
bus
.
get_object
(
self
.
address
,
'/'
,
introspect
=
False
)
obj
.
remove
(
app
,
dbus_interface
=
self
.
interface
)
def
__getattr__
(
self
,
name
):
if
name
[
0
]
<
'A'
or
name
[
0
]
>
'Z'
:
raise
AttributeError
...
...
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