From 42a3170f01841ebaa2a11fd96f2ffe2d2e50a49e Mon Sep 17 00:00:00 2001 From: Serge Dukic Date: Mon, 23 Jan 2017 21:24:27 +1300 Subject: [PATCH] Replace basestring with str method Python3 does not have a "basestring" type (as per: https://stackoverflow.com/questions/34803467/unexpected-exception-name-basestring-is-not-defined-when-invoking-ansible2) and the recommended action is to replace it with the "str" type Issue(s): None --- dopy/manager.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dopy/manager.py b/dopy/manager.py index 83c53bd..cefd804 100755 --- a/dopy/manager.py +++ b/dopy/manager.py @@ -80,7 +80,7 @@ def new_droplet(self, name, size_id, image_id, region_id, } if ssh_key_ids: # Need to be an array in v2 - if isinstance(ssh_key_ids, basestring): + if isinstance(ssh_key_ids, str): ssh_key_ids = [ssh_key_ids] if type(ssh_key_ids) == list: