changeset 1299:8eda822931c9 beta

small fixes for interactive prompt in setup
author Marcin Kuzminski <marcin@python-works.com>
date Mon, 02 May 2011 11:45:54 +0200
parents e3deb588cf14
children 882ac77dc709
files rhodecode/lib/db_manage.py
diffstat 1 files changed, 4 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/rhodecode/lib/db_manage.py	Sun May 01 22:21:19 2011 +0200
+++ b/rhodecode/lib/db_manage.py	Mon May 02 11:45:54 2011 +0200
@@ -115,7 +115,7 @@
             msg = ('Found current database under version'
                  ' control with version %s' % curr_version)
 
-        except (RuntimeError, DatabaseNotControlledError), e:
+        except (RuntimeError, DatabaseNotControlledError):
             curr_version = 1
             msg = ('Current database is not under version control. Setting'
                    ' as version %s' % curr_version)
@@ -340,15 +340,12 @@
         #check proper dir
         if not os.path.isdir(path):
             path_ok = False
-            log.error('Entered path is not a valid directory: %s [%s/3]',
-                      path, retries)
+            log.error('Given path %s is not a valid directory', path)
 
         #check write access
-        if not os.access(path, os.W_OK):
+        if not os.access(path, os.W_OK) and path_ok:
             path_ok = False
-
-            log.error('No write permission to given path: %s [%s/3]',
-                      path, retries)
+            log.error('No write permission to given path %s', path)
 
         if retries == 0:
             sys.exit()