Skip to content

Commit

Permalink
#29: To facilitate, '--create' option doesn't require the config file…
Browse files Browse the repository at this point in the history
… to exist.
  • Loading branch information
guilhermechapiewski committed Mar 18, 2009
1 parent ddb0226 commit ba342ee
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/simple_db_migrate/main.py
Expand Up @@ -5,13 +5,14 @@
import sys

class Main(object):

def __init__(self, options=None, args=None, mysql=None, db_migrate=None):
self.__cli = CLI()
self.__options = options
self.__args = args

self.__mysql = mysql
if self.__mysql is None:
if self.__mysql is None and not self.__options.create_migration:
self.__mysql = MySQL(db_config_file=self.__options.db_config_file, drop_db_first=self.__options.drop_db_first)

self.__db_migrate = db_migrate
Expand Down
2 changes: 1 addition & 1 deletion src/simple_db_migrate/mysql.py
Expand Up @@ -3,7 +3,7 @@
import sys

class MySQL(object):

def __init__(self, db_config_file="simple-db-migrate.conf", mysql_driver=MySQLdb, drop_db_first=False):
self.__cli = CLI()

Expand Down

0 comments on commit ba342ee

Please sign in to comment.