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
95027c4a
Kaydet (Commit)
95027c4a
authored
Kas 05, 2008
tarafından
Bahadır Kandemir
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
timeout argument
üst
b081e48c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
__init__.py
api/comar/__init__.py
+5
-4
No files found.
api/comar/__init__.py
Dosyayı görüntüle @
95027c4a
...
@@ -54,6 +54,7 @@ class Call:
...
@@ -54,6 +54,7 @@ class Call:
def
call
(
self
,
*
args
,
**
kwargs
):
def
call
(
self
,
*
args
,
**
kwargs
):
self
.
async
=
kwargs
.
get
(
"async"
,
None
)
self
.
async
=
kwargs
.
get
(
"async"
,
None
)
self
.
quiet
=
kwargs
.
get
(
"quiet"
,
False
)
self
.
quiet
=
kwargs
.
get
(
"quiet"
,
False
)
self
.
timeout
=
kwargs
.
get
(
"timeout"
,
120
)
if
self
.
async
and
self
.
quiet
:
if
self
.
async
and
self
.
quiet
:
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
:
...
@@ -73,7 +74,7 @@ class Call:
...
@@ -73,7 +74,7 @@ class Call:
if
self
.
quiet
:
if
self
.
quiet
:
met
(
dbus_interface
=
"tr.org.pardus.comar.
%
s.
%
s"
%
(
self
.
group
,
self
.
class_
),
ignore_reply
=
True
,
*
args
)
met
(
dbus_interface
=
"tr.org.pardus.comar.
%
s.
%
s"
%
(
self
.
group
,
self
.
class_
),
ignore_reply
=
True
,
*
args
)
else
:
else
:
met
(
dbus_interface
=
"tr.org.pardus.comar.
%
s.
%
s"
%
(
self
.
group
,
self
.
class_
),
reply_handler
=
handleResult
,
error_handler
=
handleError
,
*
args
)
met
(
dbus_interface
=
"tr.org.pardus.comar.
%
s.
%
s"
%
(
self
.
group
,
self
.
class_
),
reply_handler
=
handleResult
,
error_handler
=
handleError
,
timeout
=
self
.
timeout
,
*
args
)
else
:
else
:
def
handlePackages
(
packages
):
def
handlePackages
(
packages
):
if
self
.
quiet
:
if
self
.
quiet
:
...
@@ -95,7 +96,7 @@ class Call:
...
@@ -95,7 +96,7 @@ class Call:
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
,
introspect
=
False
)
met
=
getattr
(
obj
,
self
.
method
)
met
=
getattr
(
obj
,
self
.
method
)
met
(
dbus_interface
=
"tr.org.pardus.comar.
%
s.
%
s"
%
(
self
.
group
,
self
.
class_
),
reply_handler
=
handleResult
(
package
),
error_handler
=
handleError
(
package
),
*
args
)
met
(
dbus_interface
=
"tr.org.pardus.comar.
%
s.
%
s"
%
(
self
.
group
,
self
.
class_
),
reply_handler
=
handleResult
(
package
),
error_handler
=
handleError
(
package
),
timeout
=
self
.
timeout
,
*
args
)
def
handlePackError
(
exception
):
def
handlePackError
(
exception
):
if
self
.
quiet
:
if
self
.
quiet
:
...
@@ -109,13 +110,13 @@ class Call:
...
@@ -109,13 +110,13 @@ class Call:
handlePackages
(
packages
)
handlePackages
(
packages
)
else
:
else
:
obj
=
self
.
link
.
bus
.
get_object
(
self
.
link
.
address
,
"/"
,
introspect
=
False
)
obj
=
self
.
link
.
bus
.
get_object
(
self
.
link
.
address
,
"/"
,
introspect
=
False
)
obj
.
listModelApplications
(
"
%
s.
%
s"
%
(
self
.
group
,
self
.
class_
),
dbus_interface
=
"tr.org.pardus.comar"
,
reply_handler
=
handlePackages
,
error_handler
=
handlePackError
)
obj
.
listModelApplications
(
"
%
s.
%
s"
%
(
self
.
group
,
self
.
class_
),
dbus_interface
=
"tr.org.pardus.comar"
,
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
,
introspect
=
False
)
met
=
getattr
(
obj
,
self
.
method
)
met
=
getattr
(
obj
,
self
.
method
)
try
:
try
:
return
met
(
dbus_interface
=
"tr.org.pardus.comar.
%
s.
%
s"
%
(
self
.
group
,
self
.
class_
),
*
args
)
return
met
(
dbus_interface
=
"tr.org.pardus.comar.
%
s.
%
s"
%
(
self
.
group
,
self
.
class_
),
timeout
=
self
.
timeout
,
*
args
)
except
dbus
.
DBusException
,
e
:
except
dbus
.
DBusException
,
e
:
if
"policy.auth"
in
e
.
_dbus_error_name
:
if
"policy.auth"
in
e
.
_dbus_error_name
:
action
=
e
.
get_dbus_message
()
action
=
e
.
get_dbus_message
()
...
...
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