minor tweaks
diff --git a/src/crypto/crypto.c b/src/crypto/crypto.c
index 89d7e5e..21501c1 100644
--- a/src/crypto/crypto.c
+++ b/src/crypto/crypto.c
@@ -2,7 +2,7 @@
* crypto.c
*
* Copyright (C) AB Strakt 2001, All rights reserved
- * Copyright (C) Jean-Paul Calderone 2008, All rights reserved
+ * Copyright (C) Jean-Paul Calderone 2008-2009, All rights reserved
*
* Main file of crypto sub module.
* See the file RATIONALE for a short explanation of why this module was written.
diff --git a/src/crypto/x509name.c b/src/crypto/x509name.c
index e84d5bc..39fdcf8 100644
--- a/src/crypto/x509name.c
+++ b/src/crypto/x509name.c
@@ -2,7 +2,7 @@
* x509name.c
*
* Copyright (C) AB Strakt 2001, All rights reserved
- * Copyright (C) Jean-Paul Calderone 2008, All rights reserved
+ * Copyright (C) Jean-Paul Calderone 2008-2009, All rights reserved
*
* X.509 Name handling, mostly thin wrapping.
* See the file RATIONALE for a short explanation of why this module was written.
diff --git a/src/util.c b/src/util.c
index 2ce370d..f81e068 100644
--- a/src/util.c
+++ b/src/util.c
@@ -2,6 +2,7 @@
* util.c
*
* Copyright (C) AB Strakt 2001, All rights reserved
+ * Copyright (C) Jean-Paul Calderone 2009, All rights reserved
*
* Utility functions.
* See the file RATIONALE for a short explanation of why this module was written.
@@ -19,15 +20,13 @@
* Returns: A list of errors (new reference)
*/
PyObject *
-error_queue_to_list(void)
-{
+error_queue_to_list(void) {
PyObject *errlist, *tuple;
long err;
errlist = PyList_New(0);
- while ((err = ERR_get_error()) != 0)
- {
+ while ((err = ERR_get_error()) != 0) {
tuple = Py_BuildValue("(sss)", ERR_lib_error_string(err),
ERR_func_error_string(err),
ERR_reason_error_string(err));
@@ -38,8 +37,7 @@
return errlist;
}
-void exception_from_error_queue(PyObject *the_Error)
-{
+void exception_from_error_queue(PyObject *the_Error) {
PyObject *errlist = error_queue_to_list();
PyErr_SetObject(the_Error, errlist);
Py_DECREF(errlist);
@@ -52,9 +50,7 @@
* Returns: None
*/
void
-flush_error_queue(void)
-{
+flush_error_queue(void) {
PyObject *list = error_queue_to_list();
Py_DECREF(list);
}
-
diff --git a/test/util.py b/test/util.py
index 3d47c28..d3572db 100644
--- a/test/util.py
+++ b/test/util.py
@@ -12,6 +12,8 @@
from tempfile import mktemp
from unittest import TestCase
+from OpenSSL.crypto import Error, _exception_from_error_queue
+
class TestCase(TestCase):
"""
@@ -30,7 +32,6 @@
shutil.rmtree(temp)
elif os.path.exists(temp):
os.unlink(temp)
- from OpenSSL.crypto import Error, _exception_from_error_queue
try:
_exception_from_error_queue()
except Error, e: