Skip to content

Commit

Permalink
Some minor cleaning up.
Browse files Browse the repository at this point in the history
  • Loading branch information
agarny committed Nov 13, 2019
1 parent 727b394 commit ead1960
Showing 1 changed file with 6 additions and 6 deletions.
Expand Up @@ -215,10 +215,10 @@ static PyObject *openSimulation(PyObject *self, PyObject *args)
Py_DECREF(bytes);
#include "pythonend.h"

QString ioError = Core::openFile(fileName);
QString error = Core::openFile(fileName);

if (!ioError.isEmpty()) {
PyErr_SetString(PyExc_IOError, qPrintable(ioError));
if (!error.isEmpty()) {
PyErr_SetString(PyExc_IOError, qPrintable(error));

return nullptr;
}
Expand Down Expand Up @@ -246,10 +246,10 @@ static PyObject *openRemoteSimulation(PyObject *self, PyObject *args)
Py_DECREF(bytes);
#include "pythonend.h"

QString ioError = Core::openRemoteFile(url);
QString error = Core::openRemoteFile(url);

if (!ioError.isEmpty()) {
PyErr_SetString(PyExc_IOError, qPrintable(ioError));
if (!error.isEmpty()) {
PyErr_SetString(PyExc_IOError, qPrintable(error));

return nullptr;
}
Expand Down

0 comments on commit ead1960

Please sign in to comment.