Skip to content

Commit

Permalink
take @thorstenkampe's advice and use platform.platform instead of os.…
Browse files Browse the repository at this point in the history
…name/sys.platform, as suggested in #6
  • Loading branch information
jrjohansson committed Oct 5, 2014
1 parent 9d56a9e commit 2a62ccd
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions version_information.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@
"""
import cgi
import json
import os
import sys
import time
import locale
import IPython
import platform
from IPython.core.magic import magics_class, line_magic, Magics

try:
Expand All @@ -80,9 +80,11 @@ def version_information(self, line=''):
%version_information [optional comma-separated list of modules]
"""
self.packages = [("Python", sys.version.replace("\n", "")),
("IPython", IPython.__version__),
("OS", "%s [%s]" % (os.name, sys.platform))]
self.packages = [
("Python", sys.version.replace("\n", "")),
("IPython", IPython.__version__),
("OS", platform.platform().replace('-', ' '))
]

modules = line.replace(' ', '').split(",")

Expand Down

0 comments on commit 2a62ccd

Please sign in to comment.