Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6)

Unified Diff: third_party/logilab/common/changelog.py

Issue 707353002: pylint: upgrade to 1.3.1 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools/
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/logilab/common/changelog.py
===================================================================
--- third_party/logilab/common/changelog.py (revision 292986)
+++ third_party/logilab/common/changelog.py (working copy)
@@ -49,6 +49,8 @@
import sys
from stat import S_IWRITE
+from six import string_types
+
BULLET = '*'
SUBBULLET = '-'
INDENT = ' ' * 4
@@ -64,7 +66,7 @@
correctly printing it as X.Y.Z
"""
def __new__(cls, versionstr):
- if isinstance(versionstr, basestring):
+ if isinstance(versionstr, string_types):
versionstr = versionstr.strip(' :') # XXX (syt) duh?
parsed = cls.parse(versionstr)
else:
@@ -76,7 +78,7 @@
versionstr = versionstr.strip(' :')
try:
return [int(i) for i in versionstr.split('.')]
- except ValueError, ex:
+ except ValueError as ex:
raise ValueError("invalid literal for version '%s' (%s)"%(versionstr, ex))
def __str__(self):

Powered by Google App Engine
This is Rietveld 408576698