Skip to content

Commit

Permalink
Adding DeprecationWarning message
Browse files Browse the repository at this point in the history
  • Loading branch information
lethargilistic committed Nov 7, 2016
1 parent a735176 commit 7800c90
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion gpcharts.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
# Module's meat begins
from _templates import * #All the JavaScript graph templates
from os import path
from warnings import warn
import webbrowser
try:
from IPython.core.display import display, HTML, display_html, display_javascript
Expand Down Expand Up @@ -108,9 +109,12 @@ def write(self):
#display HTML helper method. Trys nb() first, falls back on wb() if no notebook
#the nb parameter has been deprecated and does nothing.
def dispFile(self, nb=None):
if nb is not None:
warn('dispFile() nb paraneter is deprecated and does nothing.',
DeprecationWarning)
try:
self.nb()
except:
except NameError:
self.wb()

#Displays in a Jupyter notebook. Writes current data first.
Expand Down

0 comments on commit 7800c90

Please sign in to comment.