mirror of
https://github.com/asciinema/asciinema.git
synced 2025-12-16 03:38:03 +01:00
Make sure ~/.ascii.io dir exists
This commit is contained in:
@@ -21,10 +21,10 @@ import ConfigParser
|
|||||||
import uuid
|
import uuid
|
||||||
|
|
||||||
SCRIPT_NAME = os.path.basename(sys.argv[0])
|
SCRIPT_NAME = os.path.basename(sys.argv[0])
|
||||||
|
BASE_DIR = os.path.expanduser("~/.ascii.io")
|
||||||
|
|
||||||
|
|
||||||
class AsciiCast(object):
|
class AsciiCast(object):
|
||||||
BASE_DIR = os.path.expanduser("~/.ascii.io")
|
|
||||||
QUEUE_DIR = BASE_DIR + "/queue"
|
QUEUE_DIR = BASE_DIR + "/queue"
|
||||||
|
|
||||||
def __init__(self, api_url, user_token, command, title, record_input):
|
def __init__(self, api_url, user_token, command, title, record_input):
|
||||||
@@ -392,6 +392,9 @@ def main():
|
|||||||
except ConfigParser.NoOptionError:
|
except ConfigParser.NoOptionError:
|
||||||
api_url = 'http://ascii.io'
|
api_url = 'http://ascii.io'
|
||||||
|
|
||||||
|
if not os.path.isdir(BASE_DIR):
|
||||||
|
os.mkdir(BASE_DIR)
|
||||||
|
|
||||||
with open(cfg_file, 'wb') as configfile:
|
with open(cfg_file, 'wb') as configfile:
|
||||||
config.write(configfile)
|
config.write(configfile)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user