]> git.ipfire.org Git - thirdparty/sqlalchemy/alembic.git/commitdiff
fix head only when there's no rev...
authorMike Bayer <mike_mp@zzzcomputing.com>
Thu, 4 Apr 2013 19:30:42 +0000 (15:30 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Thu, 4 Apr 2013 19:30:42 +0000 (15:30 -0400)
alembic/command.py

index 35a4eae3a044bad8b973ab230b3389714dcbf5fa..aad96911987c809835759022849d3087f7456493 100644 (file)
@@ -178,8 +178,8 @@ def current(config, head_only=False):
 
         if head_only:
             config.print_stdout("%s%s" % (
-                rev.revision,
-                " (head)" if rev.is_head else ""))
+                rev.revision if rev else None,
+                " (head)" if rev and rev.is_head else ""))
 
         else:
             config.print_stdout("Current revision for %s: %s",