Changeset - 8eda822931c9
[Not reviewed]
beta
0 1 0
Marcin Kuzminski - 15 years ago 2011-05-02 11:45:54
marcin@python-works.com
small fixes for interactive prompt in setup
1 file changed with 4 insertions and 7 deletions:
0 comments (0 inline, 0 general)
rhodecode/lib/db_manage.py
Show inline comments
 
@@ -115,7 +115,7 @@ class DbManage(object):
 
            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 @@ class DbManage(object):
 
        #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()
0 comments (0 inline, 0 general)