From dfbc72883a8e61e8f3d4ccd37169488e8e67d1fb Mon Sep 17 00:00:00 2001 From: vunhat_minh Date: Wed, 10 Sep 2014 12:06:35 +0900 Subject: [PATCH] adjust message --- rainbowstream/rainbow.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/rainbowstream/rainbow.py b/rainbowstream/rainbow.py index 9c88fc8..6a565f9 100644 --- a/rainbowstream/rainbow.py +++ b/rainbowstream/rainbow.py @@ -124,16 +124,17 @@ def upgrade_center(): Check latest and notify to upgrade """ try: - current = pkg_resources.get_distribution("rainbowstream").version + current = pkg_resources.get_distribution("rainbowstream").version url = 'https://raw.githubusercontent.com/DTVD/rainbowstream/master/setup.py' - readme = requests.get(url).content + readme = requests.get(url).content latest = readme.split("version = \'")[1].split("\'")[0] if current != latest: - notice = light_magenta('RainbowStream latest version is ') + notice = light_magenta('RainbowStream latest version is ') notice += light_green(latest) notice += light_magenta(' while your current version is ') notice += light_yellow(current) + '\n' - notice += light_magenta('You should upgrade with "pip install -U rainbowstream".') + notice += light_magenta('You should upgrade with ') + notice += light_green('pip install -U rainbowstream') printNicely(notice) except: pass -- 2.25.1