Skip to content
Permalink
Browse files

version-dependent str type

Signed-off-by: Chris Warrick <kwpolska@gmail.com>
  • Loading branch information
Kwpolska committed May 21, 2015
1 parent da075a0 commit 5c59b1992edaec8f8032df99061b32e08eb08091
Showing with 6 additions and 1 deletion.
  1. +6 −1 nikola/utils.py
@@ -1148,8 +1148,13 @@ def get_root_dir():
"""Find root directory of nikola installation by looking for conf.py"""
root = os.getcwd()

if sys.version_info[0] == 3:
confname = b'conf.py'
else:
confname = 'conf.py'

while True:
if os.path.exists(os.path.join(root, b'conf.py')):
if os.path.exists(os.path.join(root, confname)):
return root
else:
basedir = os.path.split(root)[0]

0 comments on commit 5c59b19

Please sign in to comment.