Skip to content
This repository

Issue resolution #834

merged 1 commit into from over 2 years ago

3 participants

bernardpaulus Thomas Kluyver Bernardo B. Marques

I fixed the small issue with %logstop #832

Thanks to takluyver for it's time & patience! That was my first 'git push'


Thomas Kluyver takluyver merged commit fcafc40 into from October 02, 2011
Thomas Kluyver takluyver closed this October 02, 2011
Thomas Kluyver

Tested and merged. Thanks, Bernard! Feel free to keep on contributing.

Bernardo B. Marques

i'm sorry, but I think that "Logging hasn't beend started" is better, isn't it ?


I think either works. This version means "logging hadn't been started when you asked to stop it".

but, in the same code there is this message "Logging hasn't been started yet...", I think this way is better, and you should keep a standard. How can i get in touch with you, to talk about some "clean code" issues ?


You're quite right, there is.

Either send an email to the list (, or just make a pull request with the changes you want. In fact, you could include this wording change with it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 1 unique commit by 1 author.

Oct 03, 2011
bernardpaulus Issue ipython/ipython#832 resolution fcafc40
This page is out of date. Refresh to see the latest.

Showing 1 changed file with 5 additions and 2 deletions. Show diff stats Hide diff stats

  1. 7  IPython/core/
7  IPython/core/
@@ -206,8 +206,11 @@ def logstop(self):
206 206
         made, possibly (though not necessarily) with a new filename, mode and
207 207
         other options."""
208 208
-        self.logfile.close()
-        self.logfile = None
+        if self.logfile is not None:
+            self.logfile.close()
+            self.logfile = None
+        else:
+            print "Logging hadn't been started."
211 214
         self.log_active = False
212 215
213 216
     # For backwards compatibility, in case anyone was using this.

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.