examples: python bindings
* Fixed homedir specifying logic in several cases.
This commit is contained in:
parent
b625258d54
commit
7c9f49a499
@ -62,9 +62,9 @@ elif homedir.startswith("~"):
|
||||
else:
|
||||
homedir = os.path.realpath(homedir)
|
||||
|
||||
if os.path.exists(homedir) is False:
|
||||
if homedir is not None and os.path.exists(homedir) is False:
|
||||
homedir = None
|
||||
else:
|
||||
elif homedir is not None and os.path.exists(homedir) is True:
|
||||
if os.path.isdir(homedir) is False:
|
||||
homedir = None
|
||||
else:
|
||||
|
@ -62,9 +62,9 @@ elif homedir.startswith("~"):
|
||||
else:
|
||||
homedir = os.path.realpath(homedir)
|
||||
|
||||
if os.path.exists(homedir) is False:
|
||||
if homedir is not None and os.path.exists(homedir) is False:
|
||||
homedir = None
|
||||
else:
|
||||
elif homedir is not None and os.path.exists(homedir) is True:
|
||||
if os.path.isdir(homedir) is False:
|
||||
homedir = None
|
||||
else:
|
||||
|
@ -65,9 +65,9 @@ elif homedir.startswith("~"):
|
||||
else:
|
||||
homedir = os.path.realpath(homedir)
|
||||
|
||||
if os.path.exists(homedir) is False:
|
||||
if homedir is not None and os.path.exists(homedir) is False:
|
||||
homedir = None
|
||||
else:
|
||||
elif homedir is not None and os.path.exists(homedir) is True:
|
||||
if os.path.isdir(homedir) is False:
|
||||
homedir = None
|
||||
else:
|
||||
|
@ -74,9 +74,9 @@ elif homedir.startswith("~"):
|
||||
else:
|
||||
homedir = os.path.realpath(homedir)
|
||||
|
||||
if os.path.exists(homedir) is False:
|
||||
if homedir is not None and os.path.exists(homedir) is False:
|
||||
homedir = None
|
||||
else:
|
||||
elif homedir is not None and os.path.exists(homedir) is True:
|
||||
if os.path.isdir(homedir) is False:
|
||||
homedir = None
|
||||
else:
|
||||
|
@ -60,9 +60,9 @@ elif homedir.startswith("~"):
|
||||
else:
|
||||
homedir = os.path.realpath(homedir)
|
||||
|
||||
if os.path.exists(homedir) is False:
|
||||
if homedir is not None and os.path.exists(homedir) is False:
|
||||
homedir = None
|
||||
else:
|
||||
elif homedir is not None and os.path.exists(homedir) is True:
|
||||
if os.path.isdir(homedir) is False:
|
||||
homedir = None
|
||||
else:
|
||||
|
Loading…
Reference in New Issue
Block a user