Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Issue https://github.com/ipython/ipython/issues/832 resolution #834

Merged
merged 1 commit into from

3 participants

@bernardpaulus

I fixed the small issue with %logstop #832

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

bernard

@takluyver takluyver merged commit fcafc40 into ipython:master
@takluyver
Owner

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

@bernardofire

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

Owner

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 ?

Owner

You're quite right, there is.

Either send an email to the list (ipython-dev@scipy.org), 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
Commits on Oct 2, 2011
  1. @bernardpaulus
This page is out of date. Refresh to see the latest.
Showing with 5 additions and 2 deletions.
  1. +5 −2 IPython/core/logger.py
View
7 IPython/core/logger.py
@@ -206,8 +206,11 @@ def logstop(self):
made, possibly (though not necessarily) with a new filename, mode and
other options."""
- 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."
self.log_active = False
# For backwards compatibility, in case anyone was using this.
Something went wrong with that request. Please try again.