diff options
author | Guido Günther <agx@sigxcpu.org> | 2012-01-08 20:03:10 +0100 |
---|---|---|
committer | Guido Günther <agx@sigxcpu.org> | 2012-01-08 20:36:43 +0100 |
commit | d316e22a64bee277efdc21b353294b262eb22c23 (patch) | |
tree | 25dffb21b48c119151a51a4cddeb4897e5f5416e /gbp/git/repository.py | |
parent | 90fb9b2e603d0070b08cefec6c95cff72ff91d85 (diff) |
GitRepository: use isinstance(basestring) to check for string types
Diffstat (limited to 'gbp/git/repository.py')
-rw-r--r-- | gbp/git/repository.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gbp/git/repository.py b/gbp/git/repository.py index fa2e9fc6..df49b1db 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) |