diff --git a/api/search/fetch_data.py b/api/search/fetch_data.py index 26db8917b..522717513 100644 --- a/api/search/fetch_data.py +++ b/api/search/fetch_data.py @@ -112,9 +112,9 @@ def update_profiles(): print_status_bar(ix+1, len(names_to_insert)) profile_entry = {} profile_entry['fqu'] = name - try: - profile_entry['profile'] = get_profile(name, use_legacy = True)['profile'] + profile_resp = get_profile(name, use_legacy = True) + profile_entry['profile'] = profile_resp['profile'] updated_profiles[name] = (profile_entry) actually_updated_names.add(name) except KeyboardInterrupt as e: diff --git a/blockstack_client/profile.py b/blockstack_client/profile.py index 2709cf7b3..d209b5848 100644 --- a/blockstack_client/profile.py +++ b/blockstack_client/profile.py @@ -202,13 +202,13 @@ def get_profile(name, zonefile_storage_drivers=None, profile_storage_drivers=Non and then loading the profile from that zonefile's public key. Notes on backwards compatibility (activated if use_legacy=True and use_legacy_zonefile=True): - + * (use_legacy=True) If the user's zonefile is really a legacy profile from Onename, then the profile returned will be the converted legacy profile. The returned zonefile will still be a legacy profile, however. The caller can check this and perform the conversion automatically. - * (use_legacy_zonefile=True) If the name points to a current zonefile that does not have a + * (use_legacy_zonefile=True) If the name points to a current zonefile that does not have a data public key, then the owner address of the name will be used to verify the profile's authenticity. @@ -221,7 +221,7 @@ def get_profile(name, zonefile_storage_drivers=None, profile_storage_drivers=Non proxy = get_default_proxy() if proxy is None else proxy - res = subdomains.is_address_subdomain(name) + res = subdomains.is_address_subdomain(str(name)) if res: subdomain, domain = res[1] try: diff --git a/blockstack_client/subdomains.py b/blockstack_client/subdomains.py index d7db6612e..71ebaeb9d 100644 --- a/blockstack_client/subdomains.py +++ b/blockstack_client/subdomains.py @@ -376,7 +376,8 @@ def parse_zonefile_subdomains(domain, zonefile_json): def is_address_subdomain(fqa): """ - Tests whether fqa is a subdomain. + Tests whether fqa is a subdomain. + @fqa must be a string If it isn't, returns False. If it is, returns True and a tuple (subdomain_name, domain) """