Skip to content

Commit

Permalink
Fixing console api version setting
Browse files Browse the repository at this point in the history
  • Loading branch information
Tim Anema committed Oct 1, 2020
1 parent ce9b61d commit ba67073
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion scripts/shopify_api.py
Expand Up @@ -92,7 +92,7 @@ def help(cls, task=None):
class Tasks(object):
_shop_config_dir = os.path.join(os.environ["HOME"], ".shopify", "shops")
_default_symlink = os.path.join(_shop_config_dir, "default")
_default_api_version = "2019-04"
_default_api_version = "unstable"

@classmethod
@usage("list")
Expand Down Expand Up @@ -120,6 +120,9 @@ def add(cls, connection):
config['api_key'] = input("API key? ")
config['password'] = input("Password? ")
config['api_version'] = input("API version? (leave blank for %s) " % (cls._default_api_version))
if not config['api_version'].strip():
config['api_version'] = cls._default_api_version

if not os.path.isdir(cls._shop_config_dir):
os.makedirs(cls._shop_config_dir)
with open(filename, 'w') as f:
Expand Down

0 comments on commit ba67073

Please sign in to comment.