Minor issue: network.objective not updated after failed lopf
A failed run with solvers in lopf (possibly other variants too) does not cause an Exception, which is good I think. Unless there's min_up_time and so forth some failed days don't hurt and can investigate after.
Minor issue is that network.objective is not updated it seems, but keeps the last value (of the day before). A simple check against network.objective to see whether the run succeeded fails, as does the sum of the objective. 
Both pyomo True and False are affected, also tested with Gurobi.

```
import pypsa
import numpy as np

n = pypsa.Network()
n.add('Bus', 'bus')
n.add('Generator', bus='bus', name='generator', p_nom=100, control='slack', marginal_cost=1)
n.add('Load', 'load', bus='bus')

n.set_snapshots(np.arange(3))
n.loads_t['p_set'].loc[:, 'load'] = np.array([80,120,90])

objective = []
for i in [0,1,2]:
    n.lopf(snapshots=i, solver_name='cbc', pyomo=True)
    objective.append(n.objective)

print(objective)
```

.. will yield [80,80,90] instead of [80, nan, 90].
diff --git a/pypsa/linopf.py b/pypsa/linopf.py
index 9e5291da..994a9e3d 100644
--- a/pypsa/linopf.py
+++ b/pypsa/linopf.py
@@ -1489,6 +1489,7 @@ def network_lopf(
             f"Optimization failed with status {status} and "
             f"termination condition {termination_condition}"
         )
+        n.objective = np.nan
         return status, termination_condition
 
     n.objective = obj
diff --git a/pypsa/opf.py b/pypsa/opf.py
index beb07794..3e0364df 100644
--- a/pypsa/opf.py
+++ b/pypsa/opf.py
@@ -2340,6 +2340,7 @@ def network_lopf_solve(
             "Optimisation failed with status %s and terminal condition %s"
             % (status, termination_condition)
         )
+        network.objective = np.nan
 
     return status, termination_condition
 
['pypsa/opf.py', 'pypsa/linopf.py']