Permalink
Browse files

updated style

  • Loading branch information...
1 parent 0b5aa6c commit b848be272f5ce2d8860200329b16aab7775f9638 @paltman paltman committed Jan 27, 2011
Showing with 12 additions and 10 deletions.
  1. +3 −3 nashvegas/management/commands/syncdb.py
  2. +9 −7 nashvegas/management/commands/upgradedb.py
@@ -8,17 +8,17 @@ class Command(SyncDBCommand):
"""
def handle_noargs(self, **options):
- if options.get('interactive'):
+ if options.get("interactive"):
confirm = raw_input("""
You have requested a database sync.
This CONFLICTS WITH NASHVEGAS.
Are you sure you want to do this?
Type 'yes' to continue, or 'no' to cancel: """)
else:
- confirm = 'yes'
+ confirm = "yes"
- if confirm == 'yes':
+ if confirm == "yes":
super(Command, self).handle_noargs(**options)
else:
print "Sync cancelled."
@@ -38,9 +38,9 @@ class Command(BaseCommand):
make_option("-s", "--seed", action = "store_true",
dest = "do_seed", default = False,
help = "Seed nashvegas with migrations that have previously been applied in another manner."),
- make_option('--database', action='store', dest='database',
- default=DEFAULT_DB_ALIAS, help='Nominates a database to synchronize. '
- 'Defaults to the "default" database.'),
+ make_option("--database", action="store", dest="database",
+ default=DEFAULT_DB_ALIAS, help="Nominates a database to synchronize. "
+ "Defaults to the \"default\" database."),
make_option("-p", "--path", dest = "path",
default = os.path.join(
os.path.dirname(
@@ -89,7 +89,9 @@ def _filter_down(self, stop_at=None):
return to_execute
def _get_rev(self, fpath):
- """Get an SCM verion number. Try svn and git."""
+ """
+ Get an SCM verion number. Try svn and git.
+ """
rev = None
try:
@@ -257,9 +259,9 @@ def handle(self, *args, **options):
self.args = args
self.path = options.get("path")
- self.verbosity = int(options.get('verbosity', 1))
- self.interactive = options.get('interactive')
- self.db = options.get('database', DEFAULT_DB_ALIAS)
+ self.verbosity = int(options.get("verbosity", 1))
+ self.interactive = options.get("interactive")
+ self.db = options.get("database", DEFAULT_DB_ALIAS)
self.init_nashvegas()

0 comments on commit b848be2

Please sign in to comment.