Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f463fd6

Browse files
committed
added a try/except to skip check for offline users
1 parent 246431d commit f463fd6

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

plotly/__init__.py

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,13 @@
3333
from plotly.version import __version__
3434
from plotly.check_version import get_latest
3535

36-
_latest = get_latest()
37-
38-
if __version__ != _latest:
39-
print("Your version of Plotly is currently outdated,\n" +
40-
"You're currently running {}".format(__version__) +
41-
", while the latest version is {}".format(_latest))
42-
else:
43-
print("Plotly {} is currently up to date".format(__version__))
36+
try:
37+
_latest = get_latest()
38+
if __version__ != _latest:
39+
print("Your version of Plotly is currently outdated,\n" +
40+
"You're currently running {}".format(__version__) +
41+
", while the latest version is {}".format(_latest))
42+
else:
43+
print("Plotly {} is currently up to date".format(__version__))
44+
except:
45+
pass

0 commit comments

Comments
 (0)