Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
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ç
Batuhan Osman TASKAYA
cpython
Commits
0a29e898
Kaydet (Commit)
0a29e898
authored
May 18, 2015
tarafından
Zachary Ware
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #21931: Fix error handling in msilib.FCICreate().
Patch by Jeffrey Armstrong.
üst
610a51f3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
3 deletions
+16
-3
NEWS
Misc/NEWS
+4
-0
_msi.c
PC/_msi.c
+12
-3
No files found.
Misc/NEWS
Dosyayı görüntüle @
0a29e898
...
...
@@ -48,6 +48,10 @@ Core and Builtins
Library
-------
- Issue #21931: msilib.FCICreate() now raises TypeError in the case of a bad
argument instead of a ValueError with a bogus FCI error number.
Patch by Jeffrey Armstrong.
- Issue #23796: peak and read1 methods of BufferedReader now raise ValueError
if they called on a closed object. Patch by John Hergenroeder.
...
...
PC/_msi.c
Dosyayı görüntüle @
0a29e898
...
...
@@ -243,8 +243,13 @@ static PyObject* fcicreate(PyObject* obj, PyObject* args)
for
(
i
=
0
;
i
<
PyList_GET_SIZE
(
files
);
i
++
)
{
PyObject
*
item
=
PyList_GET_ITEM
(
files
,
i
);
char
*
filename
,
*
cabname
;
if
(
!
PyArg_ParseTuple
(
item
,
"ss"
,
&
filename
,
&
cabname
))
goto
err
;
if
(
!
PyArg_ParseTuple
(
item
,
"ss"
,
&
filename
,
&
cabname
))
{
PyErr_SetString
(
PyExc_TypeError
,
"FCICreate expects a list of tuples containing two strings"
);
FCIDestroy
(
hfci
);
return
NULL
;
}
if
(
!
FCIAddFile
(
hfci
,
filename
,
cabname
,
FALSE
,
cb_getnextcabinet
,
cb_status
,
cb_getopeninfo
,
tcompTYPE_MSZIP
))
...
...
@@ -260,7 +265,11 @@ static PyObject* fcicreate(PyObject* obj, PyObject* args)
Py_INCREF
(
Py_None
);
return
Py_None
;
err:
PyErr_Format
(
PyExc_ValueError
,
"FCI error %d"
,
erf
.
erfOper
);
/* XXX better error type */
if
(
erf
.
fError
)
PyErr_Format
(
PyExc_ValueError
,
"FCI error %d"
,
erf
.
erfOper
);
/* XXX better error type */
else
PyErr_SetString
(
PyExc_ValueError
,
"FCI general error"
);
FCIDestroy
(
hfci
);
return
NULL
;
}
...
...
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