# Buggy code
def __init__(self, nametag="[taskcat]"):
    self.nametag = "{1}{0}{2}".format(nametag, PrintMsg.name_color, PrintMsg.rst_color)
    self.project = None
    self.owner = None
    self.banner = None
    self.capabilities = []
    self.verbose = False
    self.config = "config.yml"
    self.test_region = []
    self.s3bucket = None
    self.s3bucket_type = None
    self.template_path = None
    self.parameter_path = None
    self.default_region = None
    self._template_file = None
    self._template_type = None
    self._parameter_file = None
    self._parameter_path = None
    self.ddb_table = None
    self._enable_dynamodb = False
    self._termsize = 110
    self._strict_syntax_json = True
    self._banner = ""
    self._auth_mode = None
    self._report = False
    self._use_global = False
    self._parameters = {}
    self.run_cleanup = True
    self.public_s3_bucket = False
    self._aws_access_key = None
    self._aws_secret_key = None
    self._boto_profile = None
    self._boto_client = ClientFactory(logger=logger)
    self._key_url_map = {}
    self.retain_if_failed = False
    self.tags = []
    self.stack_prefix = ""
    self.template_data = None
    self.version = get_installed_version()
    self.s3_url_prefix = ""
    self.upload_only = False


# Traceback (botocore.exceptions.ClientError)
·[0;30;43m[INFO ]·[0m :Creating bucket taskcat-tag-CfnLintDemo-0a074b3f in us-east-2
Traceback (most recent call last):
File "/usr/local/bin/taskcat", line 79, in <module>
main()
File "/usr/local/bin/taskcat", line 65, in main
tcat_instance.stage_in_s3(taskcat_cfg)
File "/usr/local/lib/python3.6/site-packages/taskcat/stacker.py", line 428, in stage_in_s3
'LocationConstraint': self.get_default_region()
File "/usr/local/lib/python3.6/site-packages/botocore/client.py", line 320, in _api_call
return self._make_api_call(operation_name, kwargs)
File "/usr/local/lib/python3.6/site-packages/botocore/client.py", line 623, in _make_api_call
raise error_class(parsed_response, operation_name)
botocore.exceptions.ClientError: An error occurred (InvalidBucketName) when calling the CreateBucket operation: The specified bucket is not valid.
[Container] 2018/10/31 04:40:24 Command did not exit successfully taskcat -c $PROJECTNAME/ci/taskcat.yml exit status 1

# Fixed code
def __init__(self, nametag="[taskcat]"):
    self.nametag = "{1}{0}{2}".format(nametag, PrintMsg.name_color, PrintMsg.rst_color)
    self.project = None
    self.owner = None
    self.banner = None
    self.capabilities = []
    self.verbose = False
    self.config = "config.yml"
    self.test_region = []
    self.s3bucket = None
    self.s3bucket_type = None
    self.template_path = None
    self.parameter_path = None
    self.default_region = None
    self._template_file = None
    self._template_type = None
    self._parameter_file = None
    self._parameter_path = None
    self.ddb_table = None
    self._enable_dynamodb = False
    self._termsize = 110
    self._strict_syntax_json = True
    self._banner = ""
    self._auth_mode = None
    self._report = False
    self._use_global = False
    self._parameters = {}
    self.run_cleanup = True
    self.public_s3_bucket = False
    self._aws_access_key = None
    self._aws_secret_key = None
    self._boto_profile = None
    self._boto_client = ClientFactory(logger=logger)
    self._key_url_map = {}
    self.retain_if_failed = False
    self.tags = []
    self.stack_prefix = ""
    self.template_data = None
    self.version = get_installed_version()
    self.s3_url_prefix = ""
    self.upload_only = False
    self._max_bucket_name_length = 63