Skip to content

Commit

Permalink
Correct isinstance of str by basestring
Browse files Browse the repository at this point in the history
Change isintance(..., str) by isinstance(..., basestring)
  • Loading branch information
vlefort committed Apr 27, 2014
1 parent 341da1a commit e488e5c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions master/buildbot/steps/source/git.py
Expand Up @@ -129,10 +129,10 @@ def __init__(self, repourl=None, branch='HEAD', mode='incremental', method=None,

if not self.repourl:
bbconfig.error("Git: must provide repourl.")
if isinstance(self.mode, str):
if isinstance(self.mode, basestring):
if self.mode not in ['incremental', 'full']:
bbconfig.error("Git: mode must be 'incremental' or 'full'.")
if isinstance(self.method, str):
if isinstance(self.method, basestring):
if (self.mode == 'full' and self.method not in ['clean', 'fresh', 'clobber', 'copy', None]):
bbconfig.error("Git: invalid method for mode 'full'.")
if self.shallow and (self.mode != 'full' or self.method != 'clobber'):
Expand Down

0 comments on commit e488e5c

Please sign in to comment.