Skip to content

Commit

Permalink
version-dependent str type
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
  • Loading branch information
Kwpolska committed May 21, 2015
1 parent da075a0 commit 5c59b19
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion nikola/utils.py
Expand Up @@ -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]
Expand Down

0 comments on commit 5c59b19

Please sign in to comment.