Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: use six to check for string types #874

Merged
merged 1 commit into from
Dec 15, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions bench/config/nginx.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import os, json, click, random, string, hashlib
from bench.utils import get_sites, get_bench_name, exec_cmd
from six import string_types

def make_nginx_conf(bench_path, yes=False):
from bench import env
Expand Down Expand Up @@ -214,7 +215,7 @@ def get_sites_with_config(bench_path):
if dns_multitenant and site_config.get('domains'):
for domain in site_config.get('domains'):
# domain can be a string or a dict with 'domain', 'ssl_certificate', 'ssl_certificate_key'
if isinstance(domain, str) or isinstance(domain, unicode):
if isinstance(domain, string_types):
domain = { 'domain': domain }

domain['name'] = site
Expand All @@ -227,7 +228,7 @@ def get_sites_with_config(bench_path):
def use_wildcard_certificate(bench_path, ret):
'''
stored in common_site_config.json as:
"wildcard": {
"wildcard": {
"domain": "*.erpnext.com",
"ssl_certificate": "/path/to/erpnext.com.cert",
"ssl_certificate_key": "/path/to/erpnext.com.key"
Expand Down