From d316e22a64bee277efdc21b353294b262eb22c23 Mon Sep 17 00:00:00 2001 From: Guido Günther Date: Sun, 8 Jan 2012 20:03:10 +0100 Subject: GitRepository: use isinstance(basestring) to check for string types --- gbp/git/repository.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gbp/git/repository.py b/gbp/git/repository.py index fa2e9fc..df49b1d 100644 --- a/gbp/git/repository.py +++ b/gbp/git/repository.py @@ -688,7 +688,7 @@ class GitRepository(object): """ extra_env = {} - if type(paths) in [type(''), type(u'')]: + if isinstance(paths, basestring): paths = [ paths ] args = [ '-f' ] if force else [] @@ -710,7 +710,7 @@ class GitRepository(object): @param verbose: be verbose @type verbose: C{bool} """ - if type(paths) in [type(''), type(u'')]: + if isinstance(paths, basestring): paths = [ paths ] args = [] if verbose else ['--quiet'] @@ -786,7 +786,7 @@ class GitRepository(object): @param author_info: authorship information @type author_info: L{GitModifier} """ - if type(files) in [type(''), type(u'')]: + if isinstance(files, basestring): files = [ files ] self._commit(msg=msg, args=files, author_info=author_info) -- cgit v1.2.3