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
943a937b
Kaydet (Commit)
943a937b
authored
Ock 14, 2010
tarafından
Bahadır Kandemir
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Introspection can be useful while calling package methods
üst
ad317675
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
__init__.py
api/comar/__init__.py
+4
-4
No files found.
api/comar/__init__.py
Dosyayı görüntüle @
943a937b
...
@@ -61,7 +61,7 @@ class Call:
...
@@ -61,7 +61,7 @@ class Call:
raise
Exception
,
"async and quiet arguments can't be used together"
raise
Exception
,
"async and quiet arguments can't be used together"
if
self
.
async
or
self
.
quiet
:
if
self
.
async
or
self
.
quiet
:
if
self
.
package
:
if
self
.
package
:
obj
=
self
.
link
.
bus
.
get_object
(
self
.
link
.
address
,
"/package/
%
s"
%
self
.
package
,
introspect
=
False
)
obj
=
self
.
link
.
bus
.
get_object
(
self
.
link
.
address
,
"/package/
%
s"
%
self
.
package
)
met
=
getattr
(
obj
,
self
.
method
)
met
=
getattr
(
obj
,
self
.
method
)
def
handleResult
(
*
result
):
def
handleResult
(
*
result
):
...
@@ -81,7 +81,7 @@ class Call:
...
@@ -81,7 +81,7 @@ class Call:
def
handlePackages
(
packages
):
def
handlePackages
(
packages
):
if
self
.
quiet
:
if
self
.
quiet
:
for
package
in
packages
:
for
package
in
packages
:
obj
=
self
.
link
.
bus
.
get_object
(
self
.
link
.
address
,
"/package/
%
s"
%
package
,
introspect
=
False
)
obj
=
self
.
link
.
bus
.
get_object
(
self
.
link
.
address
,
"/package/
%
s"
%
package
)
met
=
getattr
(
obj
,
self
.
method
)
met
=
getattr
(
obj
,
self
.
method
)
met
(
dbus_interface
=
"
%
s.
%
s.
%
s"
%
(
self
.
link
.
interface
,
self
.
group
,
self
.
class_
),
ignore_reply
=
True
,
*
args
)
met
(
dbus_interface
=
"
%
s.
%
s.
%
s"
%
(
self
.
link
.
interface
,
self
.
group
,
self
.
class_
),
ignore_reply
=
True
,
*
args
)
else
:
else
:
...
@@ -95,7 +95,7 @@ class Call:
...
@@ -95,7 +95,7 @@ class Call:
return
handler
return
handler
for
package
in
packages
:
for
package
in
packages
:
obj
=
self
.
link
.
bus
.
get_object
(
self
.
link
.
address
,
"/package/
%
s"
%
package
,
introspect
=
False
)
obj
=
self
.
link
.
bus
.
get_object
(
self
.
link
.
address
,
"/package/
%
s"
%
package
)
met
=
getattr
(
obj
,
self
.
method
)
met
=
getattr
(
obj
,
self
.
method
)
met
(
dbus_interface
=
"
%
s.
%
s.
%
s"
%
(
self
.
link
.
interface
,
self
.
group
,
self
.
class_
),
reply_handler
=
handleResult
(
package
),
error_handler
=
handleError
(
package
),
timeout
=
self
.
timeout
,
*
args
)
met
(
dbus_interface
=
"
%
s.
%
s.
%
s"
%
(
self
.
link
.
interface
,
self
.
group
,
self
.
class_
),
reply_handler
=
handleResult
(
package
),
error_handler
=
handleError
(
package
),
timeout
=
self
.
timeout
,
*
args
)
...
@@ -115,7 +115,7 @@ class Call:
...
@@ -115,7 +115,7 @@ class Call:
obj
.
listModelApplications
(
"
%
s.
%
s"
%
(
self
.
group
,
self
.
class_
),
dbus_interface
=
self
.
link
.
interface
,
reply_handler
=
handlePackages
,
error_handler
=
handlePackError
,
timeout
=
self
.
timeout
)
obj
.
listModelApplications
(
"
%
s.
%
s"
%
(
self
.
group
,
self
.
class_
),
dbus_interface
=
self
.
link
.
interface
,
reply_handler
=
handlePackages
,
error_handler
=
handlePackError
,
timeout
=
self
.
timeout
)
else
:
else
:
if
self
.
package
:
if
self
.
package
:
obj
=
self
.
link
.
bus
.
get_object
(
self
.
link
.
address
,
"/package/
%
s"
%
self
.
package
,
introspect
=
False
)
obj
=
self
.
link
.
bus
.
get_object
(
self
.
link
.
address
,
"/package/
%
s"
%
self
.
package
)
met
=
getattr
(
obj
,
self
.
method
)
met
=
getattr
(
obj
,
self
.
method
)
try
:
try
:
return
met
(
dbus_interface
=
"
%
s.
%
s.
%
s"
%
(
self
.
link
.
interface
,
self
.
group
,
self
.
class_
),
timeout
=
self
.
timeout
,
*
args
)
return
met
(
dbus_interface
=
"
%
s.
%
s.
%
s"
%
(
self
.
link
.
interface
,
self
.
group
,
self
.
class_
),
timeout
=
self
.
timeout
,
*
args
)
...
...
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