Considering that President Rouhani (a moderate) cant run again due to maximum turn limits and that the Guardian Council has only allowed one well known candidate (a super hardliner) to run in the upcoming presidential election I doubt the ban has too much to do with election. There's a single moderate/reformist candidate who's basically an unknown, the rest of the candidates are other hardliner/conservative candidates, but who are all unknowns - cant have them stealing votes from the "chosen" hardliner candidate, can we know?
If it's anything to do with the Election, it would only be Rouhani trying to prevent more blackouts so that people dont get annoyed with the moderates currently in government, and start thinking that some how hardliners might magically fix their problems... rather than make them worse, which is definitely will happen.
Here's hoping the Iranian people vote for the unknown moderate candidate en masse, that would really pi$$ off the Hardliners! :)