Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
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ç
LibreOffice
core
Commits
fbe28de6
Kaydet (Commit)
fbe28de6
authored
Tem 24, 2013
tarafından
David Bolen
Kaydeden (comit)
Stephan Bergmann
Tem 24, 2013
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
fdo#66025: Simplify new ImportError logic
Signed-off-by:
Stephan Bergmann
<
sbergman@redhat.com
>
üst
6c098943
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
8 deletions
+4
-8
uno.py
pyuno/source/module/uno.py
+4
-8
No files found.
pyuno/source/module/uno.py
Dosyayı görüntüle @
fbe28de6
...
@@ -279,15 +279,14 @@ def _uno_import( name, *optargs, **kwargs ):
...
@@ -279,15 +279,14 @@ def _uno_import( name, *optargs, **kwargs ):
d
=
mod
.
__dict__
d
=
mod
.
__dict__
RuntimeException
=
pyuno
.
getClass
(
"com.sun.star.uno.RuntimeException"
)
RuntimeException
=
pyuno
.
getClass
(
"com.sun.star.uno.RuntimeException"
)
unknown
=
object
()
# unknown/missing sentinel
for
x
in
fromlist
:
for
x
in
fromlist
:
if
x
not
in
d
:
if
x
not
in
d
:
d
[
x
]
=
unknown
failed
=
False
if
x
.
startswith
(
"typeOf"
):
if
x
.
startswith
(
"typeOf"
):
try
:
try
:
d
[
x
]
=
pyuno
.
getTypeByName
(
name
+
"."
+
x
[
6
:
len
(
x
)]
)
d
[
x
]
=
pyuno
.
getTypeByName
(
name
+
"."
+
x
[
6
:
len
(
x
)]
)
except
RuntimeException
:
except
RuntimeException
:
pass
failed
=
True
else
:
else
:
try
:
try
:
# check for structs, exceptions or interfaces
# check for structs, exceptions or interfaces
...
@@ -301,12 +300,9 @@ def _uno_import( name, *optargs, **kwargs ):
...
@@ -301,12 +300,9 @@ def _uno_import( name, *optargs, **kwargs ):
try
:
try
:
d
[
x
]
=
getConstantByName
(
name
+
"."
+
x
)
d
[
x
]
=
getConstantByName
(
name
+
"."
+
x
)
except
RuntimeException
:
except
RuntimeException
:
pass
failed
=
True
if
d
[
x
]
is
unknown
:
# Remove unknown placeholder we created
del
d
[
x
]
if
failed
:
# This can be a bad uno reference, or it can just result from any
# This can be a bad uno reference, or it can just result from any
# python import failure (in a "from xxx import yyy" statement).
# python import failure (in a "from xxx import yyy" statement).
# Synthesize a general purpose exception, reusing the original
# Synthesize a general purpose exception, reusing the original
...
...
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