Browse Source

MOre useful output when creating DB

master
Abrax 3 years ago
parent
commit
338f1b969c
2 changed files with 6 additions and 3 deletions
  1. 1
    1
      README.md
  2. 5
    2
      db_methods.py

+ 1
- 1
README.md View File

@@ -20,7 +20,7 @@ These changes take effect with version 0.3 so be ready to update your scripts!
* Help message now shows version. (issue #24)
* New command: `rl` is refresh + list
* New command: `ro` is refresh + open in browser
* `lizard b` now prints more useful output.
* `c` and `b` now print more useful output.

### 0.1.1


+ 5
- 2
db_methods.py View File

@@ -16,11 +16,14 @@ from web_methods import fetch_and_parse_thread_json, dump_thread_html, dump_thre

def create_new_database():
"""Creates a new database. Will fail if database already exists."""
p = constants.orm_db_path

if os.path.exists(constants.orm_db_path):
print(constants.orm_db_path + ' already exists, doing nothing.')
if os.path.exists(p):
print('{} already exists, doing nothing.'.format(os.path.abspath(p)))
else:
print('Creating database, {} will be the location...'.format(os.path.abspath(p)), end=' ')
Thread.create_table()
print('Done!')


def backup_database():

Loading…
Cancel
Save